projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implementing John Tsiombikas' game mode patch per e-mail dated 3/15/11 8:04 PM
[freeglut]
/
src
/
freeglut_window.c
diff --git
a/src/freeglut_window.c
b/src/freeglut_window.c
index
800342d
..
fc9fc55
100644
(file)
--- a/
src/freeglut_window.c
+++ b/
src/freeglut_window.c
@@
-1316,6
+1316,12
@@
void fgOpenWindow( SFG_Window* window, const char* title,
*/
void fgCloseWindow( SFG_Window* window )
{
*/
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 (fgStructure.GameModeWindow != NULL)
+ glutLeaveGameMode();
+
#if TARGET_HOST_POSIX_X11
if( window->Window.Context )
#if TARGET_HOST_POSIX_X11
if( window->Window.Context )