diff --git a/src/RageDisplay_OGL.cpp b/src/RageDisplay_OGL.cpp index 1856705667..8bdef356c1 100644 --- a/src/RageDisplay_OGL.cpp +++ b/src/RageDisplay_OGL.cpp @@ -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(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 diff --git a/src/StepMania-net2008.vcproj b/src/StepMania-net2008.vcproj index 88d27d87bd..53c1ab9c8a 100644 --- a/src/StepMania-net2008.vcproj +++ b/src/StepMania-net2008.vcproj @@ -51,7 +51,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".;vorbis;libjpeg;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include"" - 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;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include"" - 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;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include"" - 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;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include"" - PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE" + PreprocessorDefinitions="WIN32,NDEBUG,_WINDOWS,WINDOWS,RELEASE,GLEW_STATIC" StringPooling="true" MinimalRebuild="false" ExceptionHandling="0" @@ -451,6 +451,38 @@ + + + + + + + + + + + +