From: <fa...@us...> - 2011-06-01 11:44:06
|
Revision: 922 http://freeglut.svn.sourceforge.net/freeglut/?rev=922&view=rev Author: fayjf Date: 2011-06-01 11:44:00 +0000 (Wed, 01 Jun 2011) Log Message: ----------- Fixing a 'gamemode at_exit' bug courtesy of Diederick Niehorster per e-mail dated 6/1/11 1:50 AM Modified Paths: -------------- trunk/freeglut/freeglut/src/freeglut_window.c Modified: trunk/freeglut/freeglut/src/freeglut_window.c =================================================================== --- trunk/freeglut/freeglut/src/freeglut_window.c 2011-05-27 20:37:31 UTC (rev 921) +++ trunk/freeglut/freeglut/src/freeglut_window.c 2011-06-01 11:44:00 UTC (rev 922) @@ -1332,10 +1332,11 @@ */ void fgCloseWindow( SFG_Window* window ) { - /* if we're in gamemode, call glutLeaveGameMode first to make sure the - * gamemode is properly closed before closing the window + /* if we're in gamemode and we're closing the gamemode window, + * call glutLeaveGameMode first to make sure the gamemode is + * properly closed before closing the window */ - if (fgStructure.GameModeWindow != NULL) + if (fgStructure.GameModeWindow != NULL && fgStructure.GameModeWindow->ID==window->ID) glutLeaveGameMode(); #if TARGET_HOST_POSIX_X11 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |