Fixing game mode in X11 so that it doesn't override unspecified settings per e-mail from John F. Fay dated March 13, 2011 around 4:09 PM. I think this addresses bug report 3112718.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@893 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-03-13 21:11:18 +00:00
parent 4f556f9516
commit 45305abdcb

View File

@ -419,10 +419,10 @@ void FGAPIENTRY glutGameModeString( const char* string )
);
/* Hopefully it worked, and if not, we still have the default values */
fgState.GameModeSize.X = width;
fgState.GameModeSize.Y = height;
fgState.GameModeDepth = depth;
fgState.GameModeRefresh = refresh;
if ( width > 0 ) fgState.GameModeSize.X = width;
if ( height > 0 ) fgState.GameModeSize.Y = height;
if ( depth > 0 ) fgState.GameModeDepth = depth;
if ( refresh > 0 ) fgState.GameModeRefresh = refresh;
}