From 45305abdcb186e7d70c63fc3336cbdd51b9f6b3c Mon Sep 17 00:00:00 2001 From: fayjf Date: Sun, 13 Mar 2011 21:11:18 +0000 Subject: [PATCH] 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 --- freeglut/freeglut/src/freeglut_gamemode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/freeglut/freeglut/src/freeglut_gamemode.c b/freeglut/freeglut/src/freeglut_gamemode.c index 24a8be1..b0194b2 100644 --- a/freeglut/freeglut/src/freeglut_gamemode.c +++ b/freeglut/freeglut/src/freeglut_gamemode.c @@ -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; }