diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index bde2fcc..1f8c5d7 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1176,3 +1176,11 @@ original GLUT. (304) Updated build requirements for SuSE 10.1. (305) Check fgets for return value to avoid warnings. + +************************************************************************** +* Changes on September 20, 2006 +************************************************************************** + +(306) Changed "fgStructure.GameMode" to "fgStructure.GameModeWindow" to +reflect better what it is + diff --git a/freeglut/freeglut/src/freeglut_gamemode.c b/freeglut/freeglut/src/freeglut_gamemode.c index bdd180f..5f8faad 100644 --- a/freeglut/freeglut/src/freeglut_gamemode.c +++ b/freeglut/freeglut/src/freeglut_gamemode.c @@ -417,8 +417,8 @@ int FGAPIENTRY glutEnterGameMode( void ) { FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEnterGameMode" ); - if( fgStructure.GameMode ) - fgAddToWindowDestroyList( fgStructure.GameMode ); + if( fgStructure.GameModeWindow ) + fgAddToWindowDestroyList( fgStructure.GameModeWindow ); else fghRememberState( ); @@ -428,16 +428,16 @@ int FGAPIENTRY glutEnterGameMode( void ) return 0; } - fgStructure.GameMode = fgCreateWindow( + fgStructure.GameModeWindow = fgCreateWindow( NULL, "FREEGLUT", 0, 0, fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE ); - fgStructure.GameMode->State.Width = fgState.GameModeSize.X; - fgStructure.GameMode->State.Height = fgState.GameModeSize.Y; - fgStructure.GameMode->State.NeedToResize = GL_TRUE; + fgStructure.GameModeWindow->State.Width = fgState.GameModeSize.X; + fgStructure.GameModeWindow->State.Height = fgState.GameModeSize.Y; + fgStructure.GameModeWindow->State.NeedToResize = GL_TRUE; - fgStructure.GameMode->State.IsGameMode = GL_TRUE; + fgStructure.GameModeWindow->State.IsGameMode = GL_TRUE; #if TARGET_HOST_UNIX_X11 @@ -457,12 +457,12 @@ int FGAPIENTRY glutEnterGameMode( void ) * the application which we have to aviod, so wait until it's viewable: */ while( GrabSuccess != XGrabPointer( - fgDisplay.Display, fgStructure.GameMode->Window.Handle, + fgDisplay.Display, fgStructure.GameModeWindow->Window.Handle, TRUE, ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | PointerMotionMask, GrabModeAsync, GrabModeAsync, - fgStructure.GameMode->Window.Handle, None, CurrentTime) ) + fgStructure.GameModeWindow->Window.Handle, None, CurrentTime) ) usleep( 100 ); /* @@ -471,7 +471,7 @@ int FGAPIENTRY glutEnterGameMode( void ) */ XSetInputFocus( fgDisplay.Display, - fgStructure.GameMode->Window.Handle, + fgStructure.GameModeWindow->Window.Handle, RevertToNone, CurrentTime ); @@ -521,7 +521,7 @@ int FGAPIENTRY glutEnterGameMode( void ) /* Grab the keyboard, too */ XGrabKeyboard( fgDisplay.Display, - fgStructure.GameMode->Window.Handle, + fgStructure.GameModeWindow->Window.Handle, FALSE, GrabModeAsync, GrabModeAsync, CurrentTime @@ -529,7 +529,7 @@ int FGAPIENTRY glutEnterGameMode( void ) #endif - return fgStructure.GameMode->ID; + return fgStructure.GameModeWindow->ID; } /* @@ -539,12 +539,12 @@ void FGAPIENTRY glutLeaveGameMode( void ) { FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutLeaveGameMode" ); - freeglut_return_if_fail( fgStructure.GameMode ); + freeglut_return_if_fail( fgStructure.GameModeWindow ); - fgStructure.GameMode->State.IsGameMode = GL_FALSE; + fgStructure.GameModeWindow->State.IsGameMode = GL_FALSE; - fgAddToWindowDestroyList( fgStructure.GameMode ); - fgStructure.GameMode = NULL; + fgAddToWindowDestroyList( fgStructure.GameModeWindow ); + fgStructure.GameModeWindow = NULL; #if TARGET_HOST_UNIX_X11 @@ -566,7 +566,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat ) switch( eWhat ) { case GLUT_GAME_MODE_ACTIVE: - return !!fgStructure.GameMode; + return !!fgStructure.GameModeWindow; case GLUT_GAME_MODE_POSSIBLE: return fghChangeDisplayMode( GL_TRUE ); @@ -587,7 +587,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat ) /* * This is true if the game mode has been activated successfully.. */ - return !!fgStructure.GameMode; + return !!fgStructure.GameModeWindow; } fgWarning( "Unknown gamemode get: %d", eWhat ); diff --git a/freeglut/freeglut/src/freeglut_internal.h b/freeglut/freeglut/src/freeglut_internal.h index c2fa064..ca751f3 100644 --- a/freeglut/freeglut/src/freeglut_internal.h +++ b/freeglut/freeglut/src/freeglut_internal.h @@ -592,19 +592,19 @@ struct tagSFG_WindowList typedef struct tagSFG_Structure SFG_Structure; struct tagSFG_Structure { - SFG_List Windows; /* The global windows list */ - SFG_List Menus; /* The global menus list */ + SFG_List Windows; /* The global windows list */ + SFG_List Menus; /* The global menus list */ SFG_List WindowsToDestroy; - SFG_Window* CurrentWindow; /* The currently set window */ - SFG_Menu* CurrentMenu; /* Same, but menu... */ + SFG_Window* CurrentWindow; /* The currently set window */ + SFG_Menu* CurrentMenu; /* Same, but menu... */ - SFG_MenuContext* MenuContext; /* OpenGL rendering context for menus */ + SFG_MenuContext* MenuContext; /* OpenGL rendering context for menus */ - SFG_Window* GameMode; /* The game mode window */ + SFG_Window* GameModeWindow; /* The game mode window */ - int WindowID; /* The new current window ID */ - int MenuID; /* The new current menu ID */ + int WindowID; /* The new current window ID */ + int MenuID; /* The new current menu ID */ }; /* diff --git a/freeglut/freeglut/src/freeglut_menu.c b/freeglut/freeglut/src/freeglut_menu.c index 05fd2bd..e684591 100644 --- a/freeglut/freeglut/src/freeglut_menu.c +++ b/freeglut/freeglut/src/freeglut_menu.c @@ -140,7 +140,7 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry ) */ static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y ) { - if( fgStructure.GameMode ) + if( fgStructure.GameModeWindow ) { #if TARGET_HOST_UNIX_X11 int wx, wy; diff --git a/freeglut/freeglut/src/freeglut_state.c b/freeglut/freeglut/src/freeglut_state.c index 93a3f1b..efc94b1 100644 --- a/freeglut/freeglut/src/freeglut_state.c +++ b/freeglut/freeglut/src/freeglut_state.c @@ -370,7 +370,7 @@ int FGAPIENTRY glutGet( GLenum eWhat ) /* ...then we've got to correct the results we've just received... */ #if !TARGET_HOST_WINCE - if ( ( fgStructure.GameMode != fgStructure.CurrentWindow ) && ( fgStructure.CurrentWindow->Parent == NULL ) && + if ( ( fgStructure.GameModeWindow != fgStructure.CurrentWindow ) && ( fgStructure.CurrentWindow->Parent == NULL ) && ( ! fgStructure.CurrentWindow->IsMenu ) ) { winRect.left += GetSystemMetrics( SM_CXSIZEFRAME ); diff --git a/freeglut/freeglut/src/freeglut_structure.c b/freeglut/freeglut/src/freeglut_structure.c index ecb4f10..2c2ebf6 100644 --- a/freeglut/freeglut/src/freeglut_structure.c +++ b/freeglut/freeglut/src/freeglut_structure.c @@ -346,7 +346,7 @@ void fgCreateStructure( void ) fgStructure.CurrentWindow = NULL; fgStructure.CurrentMenu = NULL; fgStructure.MenuContext = NULL; - fgStructure.GameMode = NULL; + fgStructure.GameModeWindow = NULL; fgStructure.WindowID = 0; fgStructure.MenuID = 0; }