Changing "GameMode" to "GameModeWindow ... and testing whether I can get to SVN directly

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@696 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2006-09-21 17:13:37 +00:00
parent 3929b150ac
commit d4e5d7ed27
6 changed files with 37 additions and 29 deletions

View File

@ -1176,3 +1176,11 @@ original GLUT.
(304) Updated build requirements for SuSE 10.1. (304) Updated build requirements for SuSE 10.1.
(305) Check fgets for return value to avoid warnings. (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

View File

@ -417,8 +417,8 @@ int FGAPIENTRY glutEnterGameMode( void )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEnterGameMode" ); FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutEnterGameMode" );
if( fgStructure.GameMode ) if( fgStructure.GameModeWindow )
fgAddToWindowDestroyList( fgStructure.GameMode ); fgAddToWindowDestroyList( fgStructure.GameModeWindow );
else else
fghRememberState( ); fghRememberState( );
@ -428,16 +428,16 @@ int FGAPIENTRY glutEnterGameMode( void )
return 0; return 0;
} }
fgStructure.GameMode = fgCreateWindow( fgStructure.GameModeWindow = fgCreateWindow(
NULL, "FREEGLUT", 0, 0, NULL, "FREEGLUT", 0, 0,
fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE fgState.GameModeSize.X, fgState.GameModeSize.Y, GL_TRUE, GL_FALSE
); );
fgStructure.GameMode->State.Width = fgState.GameModeSize.X; fgStructure.GameModeWindow->State.Width = fgState.GameModeSize.X;
fgStructure.GameMode->State.Height = fgState.GameModeSize.Y; fgStructure.GameModeWindow->State.Height = fgState.GameModeSize.Y;
fgStructure.GameMode->State.NeedToResize = GL_TRUE; fgStructure.GameModeWindow->State.NeedToResize = GL_TRUE;
fgStructure.GameMode->State.IsGameMode = GL_TRUE; fgStructure.GameModeWindow->State.IsGameMode = GL_TRUE;
#if TARGET_HOST_UNIX_X11 #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: * the application which we have to aviod, so wait until it's viewable:
*/ */
while( GrabSuccess != XGrabPointer( while( GrabSuccess != XGrabPointer(
fgDisplay.Display, fgStructure.GameMode->Window.Handle, fgDisplay.Display, fgStructure.GameModeWindow->Window.Handle,
TRUE, TRUE,
ButtonPressMask | ButtonReleaseMask | ButtonMotionMask ButtonPressMask | ButtonReleaseMask | ButtonMotionMask
| PointerMotionMask, | PointerMotionMask,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
fgStructure.GameMode->Window.Handle, None, CurrentTime) ) fgStructure.GameModeWindow->Window.Handle, None, CurrentTime) )
usleep( 100 ); usleep( 100 );
/* /*
@ -471,7 +471,7 @@ int FGAPIENTRY glutEnterGameMode( void )
*/ */
XSetInputFocus( XSetInputFocus(
fgDisplay.Display, fgDisplay.Display,
fgStructure.GameMode->Window.Handle, fgStructure.GameModeWindow->Window.Handle,
RevertToNone, RevertToNone,
CurrentTime CurrentTime
); );
@ -521,7 +521,7 @@ int FGAPIENTRY glutEnterGameMode( void )
/* Grab the keyboard, too */ /* Grab the keyboard, too */
XGrabKeyboard( XGrabKeyboard(
fgDisplay.Display, fgDisplay.Display,
fgStructure.GameMode->Window.Handle, fgStructure.GameModeWindow->Window.Handle,
FALSE, FALSE,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
CurrentTime CurrentTime
@ -529,7 +529,7 @@ int FGAPIENTRY glutEnterGameMode( void )
#endif #endif
return fgStructure.GameMode->ID; return fgStructure.GameModeWindow->ID;
} }
/* /*
@ -539,12 +539,12 @@ void FGAPIENTRY glutLeaveGameMode( void )
{ {
FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutLeaveGameMode" ); 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 ); fgAddToWindowDestroyList( fgStructure.GameModeWindow );
fgStructure.GameMode = NULL; fgStructure.GameModeWindow = NULL;
#if TARGET_HOST_UNIX_X11 #if TARGET_HOST_UNIX_X11
@ -566,7 +566,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat )
switch( eWhat ) switch( eWhat )
{ {
case GLUT_GAME_MODE_ACTIVE: case GLUT_GAME_MODE_ACTIVE:
return !!fgStructure.GameMode; return !!fgStructure.GameModeWindow;
case GLUT_GAME_MODE_POSSIBLE: case GLUT_GAME_MODE_POSSIBLE:
return fghChangeDisplayMode( GL_TRUE ); return fghChangeDisplayMode( GL_TRUE );
@ -587,7 +587,7 @@ int FGAPIENTRY glutGameModeGet( GLenum eWhat )
/* /*
* This is true if the game mode has been activated successfully.. * This is true if the game mode has been activated successfully..
*/ */
return !!fgStructure.GameMode; return !!fgStructure.GameModeWindow;
} }
fgWarning( "Unknown gamemode get: %d", eWhat ); fgWarning( "Unknown gamemode get: %d", eWhat );

View File

@ -601,7 +601,7 @@ struct tagSFG_Structure
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 WindowID; /* The new current window ID */
int MenuID; /* The new current menu ID */ int MenuID; /* The new current menu ID */

View File

@ -140,7 +140,7 @@ static void fghDeactivateSubMenu( SFG_MenuEntry *menuEntry )
*/ */
static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y ) static GLvoid fghGetVMaxExtent( SFG_Window* window, int* x, int* y )
{ {
if( fgStructure.GameMode ) if( fgStructure.GameModeWindow )
{ {
#if TARGET_HOST_UNIX_X11 #if TARGET_HOST_UNIX_X11
int wx, wy; int wx, wy;

View File

@ -370,7 +370,7 @@ int FGAPIENTRY glutGet( GLenum eWhat )
/* ...then we've got to correct the results we've just received... */ /* ...then we've got to correct the results we've just received... */
#if !TARGET_HOST_WINCE #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 ) ) ( ! fgStructure.CurrentWindow->IsMenu ) )
{ {
winRect.left += GetSystemMetrics( SM_CXSIZEFRAME ); winRect.left += GetSystemMetrics( SM_CXSIZEFRAME );

View File

@ -346,7 +346,7 @@ void fgCreateStructure( void )
fgStructure.CurrentWindow = NULL; fgStructure.CurrentWindow = NULL;
fgStructure.CurrentMenu = NULL; fgStructure.CurrentMenu = NULL;
fgStructure.MenuContext = NULL; fgStructure.MenuContext = NULL;
fgStructure.GameMode = NULL; fgStructure.GameModeWindow = NULL;
fgStructure.WindowID = 0; fgStructure.WindowID = 0;
fgStructure.MenuID = 0; fgStructure.MenuID = 0;
} }