From 1a617fc8020eafd2f8d6d95a3f2832268fb9c93c Mon Sep 17 00:00:00 2001 From: Diederick Niehorster Date: Wed, 6 Mar 2013 09:17:52 +0000 Subject: [PATCH] gamemode: just go fullscreen git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1558 7f0cb862-5218-0410-a997-914c9d46530a --- src/fg_gamemode.c | 4 +--- src/fg_window.c | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fg_gamemode.c b/src/fg_gamemode.c index eb29131..d210a88 100644 --- a/src/fg_gamemode.c +++ b/src/fg_gamemode.c @@ -112,9 +112,7 @@ int FGAPIENTRY glutEnterGameMode( void ) GL_TRUE, GL_FALSE ); - fgStructure.GameModeWindow->State.Width = fgState.GameModeSize.X; - fgStructure.GameModeWindow->State.Height = fgState.GameModeSize.Y; - fgStructure.GameModeWindow->State.NeedToResize = GL_TRUE; + glutFullScreen(); fgPlatformEnterGameMode(); diff --git a/src/fg_window.c b/src/fg_window.c index 3b61192..ad151cf 100644 --- a/src/fg_window.c +++ b/src/fg_window.c @@ -437,9 +437,11 @@ void FGAPIENTRY glutFullScreen( void ) fgWarning("glutFullScreen called on a child window, ignoring..."); return; } - else if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==win->ID) + else if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==win->ID && win->State.IsFullscreen) { - /* Ignore fullscreen call on GameMode window, those are always fullscreen already */ + /* Ignore fullscreen call on GameMode window, those are always fullscreen already + * only exception is during first entering GameMode + */ return; } -- 1.7.10.4