Fix a game mode crashing bug, conditional compilation for Windows, and comment out...
authorJ.C. Jones <jc@insufficient.coffee>
Wed, 11 Aug 2004 15:56:20 +0000 (15:56 +0000)
committerJ.C. Jones <jc@insufficient.coffee>
Wed, 11 Aug 2004 15:56:20 +0000 (15:56 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@511 7f0cb862-5218-0410-a997-914c9d46530a

src/freeglut_gamemode.c
src/freeglut_internal.h
src/freeglut_main.c

index afa0e7a..09e38ab 100644 (file)
@@ -549,6 +549,8 @@ void FGAPIENTRY glutLeaveGameMode( void )
 
     fgAddToWindowDestroyList( fgStructure.GameMode );
 
+    fgStructure.GameMode = NULL ;
+
 #if TARGET_HOST_UNIX_X11
 
     XUngrabPointer( fgDisplay.Display, CurrentTime );
index 8c8e1d2..57c1dda 100644 (file)
@@ -191,7 +191,7 @@ struct tagSFG_XYUse
 typedef struct tagSFG_Time SFG_Time;
 struct tagSFG_Time
 {
-#ifdef WIN32
+#if TARGET_HOST_WIN32 || TARGET_HOST_WINCE
     DWORD Value;
 #else
     struct timeval  Value;
index 9879ff7..e45ee4d 100644 (file)
@@ -1321,7 +1321,7 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
         break;
 #if 0
     case WM_SETFOCUS:
-        printf("WM_SETFOCUS: %p\n", window );
+        /* printf("WM_SETFOCUS: %p\n", window ); */
         lRet = DefWindowProc( hWnd, uMsg, wParam, lParam );
         break;
 
@@ -1329,8 +1329,8 @@ LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam,
         if (LOWORD(wParam) != WA_INACTIVE)
         {
             /* glutSetCursor( fgStructure.Window->State.Cursor ); */
-            printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window,
-                   window->State.Cursor );
+            /* printf("WM_ACTIVATE: glutSetCursor( %p, %d)\n", window,
+                   window->State.Cursor ); */
             glutSetCursor( window->State.Cursor );
         }