localize error string

add logging to try and diagnose software renderer detection isn't working
This commit is contained in:
Chris Danford
2006-08-03 09:14:37 +00:00
parent 25c8f6e839
commit 48b147f7b4
@@ -4,6 +4,7 @@
#include "RageUtil.h" #include "RageUtil.h"
#include "RageLog.h" #include "RageLog.h"
#include "RageDisplay.h" #include "RageDisplay.h"
#include "LocalizedString.h"
#include <GL/gl.h> #include <GL/gl.h>
@@ -264,14 +265,21 @@ void LowLevelWindow_Win32::EndConcurrentRendering()
wglMakeCurrent( NULL, NULL ); wglMakeCurrent( NULL, NULL );
} }
static LocalizedString OPENGL_NOT_AVAILABLE( "LowLevelWindow_Win32", "OpenGL hardware acceleration is not available." );
bool LowLevelWindow_Win32::IsSoftwareRenderer( RString &sError ) bool LowLevelWindow_Win32::IsSoftwareRenderer( RString &sError )
{ {
if( strcmp((const char*)glGetString(GL_VENDOR),"Microsoft Corporation") && RString sVendor = (const char*)glGetString(GL_VENDOR);
strcmp((const char*)glGetString(GL_RENDERER),"GDI Generic") ) RString sRenderer = (const char*)glGetString(GL_RENDERER);
return false;
sError = "OpenGL hardware acceleration is not available."; LOG->Trace( "LowLevelWindow_Win32::IsSoftwareRenderer '%s', '%s'", sVendor.c_str(), sRenderer.c_str() );
if( sVendor == "Microsoft Corporation" && sRenderer == "GDI Generic" )
{
sError = OPENGL_NOT_AVAILABLE;
return true; return true;
}
return false;
} }
void LowLevelWindow_Win32::SwapBuffers() void LowLevelWindow_Win32::SwapBuffers()