Implementing the 'gamemode-testing_windows.patch' per e-mail from Diederick Niehorster dated 3/16/11 1:06 AM

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@902 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-03-17 02:55:51 +00:00
parent fb0382908b
commit 59cf65ed21

View File

@ -477,12 +477,15 @@ static GLboolean fghChangeDisplayMode( GLboolean haveToTest )
case DISP_CHANGE_SUCCESSFUL: case DISP_CHANGE_SUCCESSFUL:
success = GL_TRUE; success = GL_TRUE;
/* update vars in case if windows switched to proper mode */ if (!haveToTest)
EnumDisplaySettings( fgDisplay.DisplayName, FREEGLUT_ENUM_CURRENT_SETTINGS, &devMode ); {
fgState.GameModeSize.X = devMode.dmPelsWidth; /* update vars in case if windows switched to proper mode */
fgState.GameModeSize.Y = devMode.dmPelsHeight; EnumDisplaySettings( fgDisplay.DisplayName, FREEGLUT_ENUM_CURRENT_SETTINGS, &devMode );
fgState.GameModeDepth = devMode.dmBitsPerPel; fgState.GameModeSize.X = devMode.dmPelsWidth;
fgState.GameModeRefresh = devMode.dmDisplayFrequency; fgState.GameModeSize.Y = devMode.dmPelsHeight;
fgState.GameModeDepth = devMode.dmBitsPerPel;
fgState.GameModeRefresh = devMode.dmDisplayFrequency;
}
break; break;
case DISP_CHANGE_RESTART: case DISP_CHANGE_RESTART:
fggmstr = "The computer must be restarted for the graphics mode to work."; fggmstr = "The computer must be restarted for the graphics mode to work.";