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:
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.";