this seems to fix the compile on Windows; not sure if it's the best way of doing it, though.

This commit is contained in:
AJ Kelly
2011-05-04 00:26:12 -05:00
parent ca68672e01
commit 0b32783697
2 changed files with 47 additions and 5 deletions
+11 -1
View File
@@ -704,6 +704,11 @@ void RageDisplay_Legacy::ResolutionChanged()
RageDisplay::ResolutionChanged();
}
#if defined(WINDOWS)
typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)( int );
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0;
#endif
// Return true if mode change was successful.
// bNewDeviceOut is set true if a new device was created and textures
// need to be reloaded.
@@ -739,11 +744,16 @@ RString RageDisplay_Legacy::TryVideoMode( const VideoModeParams &p, bool &bNewDe
InitShaders();
}
const char *extensions = reinterpret_cast<const char *>(glGetString( GL_EXTENSIONS ));
// I'm not sure this is correct -Colby
#if defined(WINDOWS)
if( strstr( extensions, "WGL_EXT_swap_control" ) == 0 )
return RString("The WGL_EXT_swap_control extension is not supported on your computer.");
/* Set vsync the Windows way, if we can. (What other extensions are there
* to do this, for other archs?) */
if (GLEW_WGL_EXT_swap_control)
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
if (wglSwapIntervalEXT)
wglSwapIntervalEXT(p.vsync);
#endif
+36 -4
View File
@@ -51,7 +51,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;&quot;..\extern\glew-1.5.8\include&quot;"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG,GLEW_STATIC"
ExceptionHandling="0"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@@ -158,7 +158,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="2"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;&quot;..\extern\glew-1.5.8\include&quot;"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,GLEW_STATIC"
StringPooling="true"
MinimalRebuild="false"
ExceptionHandling="0"
@@ -262,7 +262,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;&quot;..\extern\glew-1.5.8\include&quot;"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG"
PreprocessorDefinitions="WIN32,_DEBUG,_WINDOWS,WINDOWS,DEBUG,GLEW_STATIC"
ExceptionHandling="0"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@@ -369,7 +369,7 @@
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories=".;vorbis;libjpeg;&quot;lua-5.1\include&quot;;ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;&quot;..\extern\glew-1.5.8\include&quot;"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE"
PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,GLEW_STATIC"
StringPooling="true"
MinimalRebuild="false"
ExceptionHandling="0"
@@ -451,6 +451,38 @@
<File
RelativePath="..\extern\glew-1.5.8\src\glew.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="FastDebug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
<FileConfiguration
Name="Release-SSE2|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
</Filter>
<Filter