{
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEnterGameMode" );
- if( fgStructure.GameMode )
- fgAddToWindowDestroyList( fgStructure.GameMode );
+ if( fgStructure.GameModeWindow )
+ fgAddToWindowDestroyList( fgStructure.GameModeWindow );
else
fghRememberState( );
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
* 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 );
/*
*/
XSetInputFocus(
fgDisplay.Display,
- fgStructure.GameMode->Window.Handle,
+ fgStructure.GameModeWindow->Window.Handle,
RevertToNone,
CurrentTime
);
/* Grab the keyboard, too */
XGrabKeyboard(
fgDisplay.Display,
- fgStructure.GameMode->Window.Handle,
+ fgStructure.GameModeWindow->Window.Handle,
FALSE,
GrabModeAsync, GrabModeAsync,
CurrentTime
#endif
- return fgStructure.GameMode->ID;
+ return fgStructure.GameModeWindow->ID;
}
/*
{
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
switch( eWhat )
{
case GLUT_GAME_MODE_ACTIVE:
- return !!fgStructure.GameMode;
+ return !!fgStructure.GameModeWindow;
case GLUT_GAME_MODE_POSSIBLE:
return fghChangeDisplayMode( GL_TRUE );
/*
* This is true if the game mode has been activated successfully..
*/
- return !!fgStructure.GameMode;
+ return !!fgStructure.GameModeWindow;
}
fgWarning( "Unknown gamemode get: %d", eWhat );
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 */
};
/*