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:
+11
-1
@@ -704,6 +704,11 @@ void RageDisplay_Legacy::ResolutionChanged()
|
|||||||
RageDisplay::ResolutionChanged();
|
RageDisplay::ResolutionChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(WINDOWS)
|
||||||
|
typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)( int );
|
||||||
|
PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Return true if mode change was successful.
|
// Return true if mode change was successful.
|
||||||
// bNewDeviceOut is set true if a new device was created and textures
|
// bNewDeviceOut is set true if a new device was created and textures
|
||||||
// need to be reloaded.
|
// need to be reloaded.
|
||||||
@@ -739,11 +744,16 @@ RString RageDisplay_Legacy::TryVideoMode( const VideoModeParams &p, bool &bNewDe
|
|||||||
InitShaders();
|
InitShaders();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *extensions = reinterpret_cast<const char *>(glGetString( GL_EXTENSIONS ));
|
||||||
// I'm not sure this is correct -Colby
|
// I'm not sure this is correct -Colby
|
||||||
#if defined(WINDOWS)
|
#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
|
/* Set vsync the Windows way, if we can. (What other extensions are there
|
||||||
* to do this, for other archs?) */
|
* to do this, for other archs?) */
|
||||||
if (GLEW_WGL_EXT_swap_control)
|
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress( "wglSwapIntervalEXT" );
|
||||||
|
if (wglSwapIntervalEXT)
|
||||||
wglSwapIntervalEXT(p.vsync);
|
wglSwapIntervalEXT(p.vsync);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=".;vorbis;libjpeg;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include""
|
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"
|
ExceptionHandling="0"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="2"
|
FavorSizeOrSpeed="2"
|
||||||
AdditionalIncludeDirectories=".;vorbis;libjpeg;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include""
|
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"
|
StringPooling="true"
|
||||||
MinimalRebuild="false"
|
MinimalRebuild="false"
|
||||||
ExceptionHandling="0"
|
ExceptionHandling="0"
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=".;vorbis;libjpeg;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include""
|
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"
|
ExceptionHandling="0"
|
||||||
BasicRuntimeChecks="0"
|
BasicRuntimeChecks="0"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
@@ -369,7 +369,7 @@
|
|||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
AdditionalIncludeDirectories=".;vorbis;libjpeg;"lua-5.1\include";ffmpeg\modern_working\include;BaseClasses;jsoncpp/include;"..\extern\glew-1.5.8\include""
|
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"
|
StringPooling="true"
|
||||||
MinimalRebuild="false"
|
MinimalRebuild="false"
|
||||||
ExceptionHandling="0"
|
ExceptionHandling="0"
|
||||||
@@ -451,6 +451,38 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\extern\glew-1.5.8\src\glew.c"
|
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>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
|
|||||||
Reference in New Issue
Block a user