|
From: <ma...@us...> - 2004-03-11 21:57:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1970/native/win32 Modified Files: org_lwjgl_opengl_Window.cpp Log Message: support for 'org.lwjgl.opengl.Window.allowSoftwareOpenGL' added utility getBooleanProperty method Index: org_lwjgl_opengl_Window.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_Window.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- org_lwjgl_opengl_Window.cpp 23 Feb 2004 23:42:57 -0000 1.21 +++ org_lwjgl_opengl_Window.cpp 11 Mar 2004 21:30:48 -0000 1.22 @@ -59,6 +59,7 @@ static bool closerequested; static jboolean vsync; +static jboolean allowSoftwareOpenGL; // Whether to allow software opengl //CAS: commented these out as no longer used //extern void tempRestoreDisplayMode(); @@ -174,8 +175,11 @@ } if ((desc.dwFlags & PFD_GENERIC_FORMAT) != 0 || (desc.dwFlags & PFD_GENERIC_ACCELERATED) != 0) { - throwException(env, "Mode not supported by hardware"); - return -1; + // secondary check for software override + if(!allowSoftwareOpenGL) { + throwException(env, "Mode not supported by hardware"); + return -1; + } } if ((desc.dwFlags & flags) != flags) { @@ -528,6 +532,9 @@ isFullScreen = fullscreen == JNI_TRUE; vsync = JNI_FALSE; + // Speacial option for allowing software opengl + allowSoftwareOpenGL = getBooleanProperty(env, "org.lwjgl.opengl.Window.allowSoftwareOpenGL"); + // 1. Register window class if necessary if (!registerWindow()) { throwException(env, "Could not register window class"); |