From: John F. Fay Date: Thu, 17 Mar 2011 02:55:51 +0000 (+0000) Subject: Implementing the 'gamemode-testing_windows.patch' per e-mail from Diederick Niehorste... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=cf3fe97a5e386ff5f22a3a8025335298c3747d93;p=freeglut Implementing the 'gamemode-testing_windows.patch' per e-mail from Diederick Niehorster dated 3/16/11 1:06 AM git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@902 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_gamemode.c b/src/freeglut_gamemode.c index 7569d1f..2425ac4 100644 --- a/src/freeglut_gamemode.c +++ b/src/freeglut_gamemode.c @@ -477,12 +477,15 @@ static GLboolean fghChangeDisplayMode( GLboolean haveToTest ) case DISP_CHANGE_SUCCESSFUL: success = GL_TRUE; - /* update vars in case if windows switched to proper mode */ - EnumDisplaySettings( fgDisplay.DisplayName, FREEGLUT_ENUM_CURRENT_SETTINGS, &devMode ); - fgState.GameModeSize.X = devMode.dmPelsWidth; - fgState.GameModeSize.Y = devMode.dmPelsHeight; - fgState.GameModeDepth = devMode.dmBitsPerPel; - fgState.GameModeRefresh = devMode.dmDisplayFrequency; + if (!haveToTest) + { + /* update vars in case if windows switched to proper mode */ + EnumDisplaySettings( fgDisplay.DisplayName, FREEGLUT_ENUM_CURRENT_SETTINGS, &devMode ); + fgState.GameModeSize.X = devMode.dmPelsWidth; + fgState.GameModeSize.Y = devMode.dmPelsHeight; + fgState.GameModeDepth = devMode.dmBitsPerPel; + fgState.GameModeRefresh = devMode.dmDisplayFrequency; + } break; case DISP_CHANGE_RESTART: fggmstr = "The computer must be restarted for the graphics mode to work.";