projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Joe Krahn\'s input (dials) device implementation.
[freeglut]
/
src
/
freeglut_init.c
diff --git
a/src/freeglut_init.c
b/src/freeglut_init.c
index
078192c
..
13310f7
100644
(file)
--- a/
src/freeglut_init.c
+++ b/
src/freeglut_init.c
@@
-82,7
+82,8
@@
SFG_State fgState = { { -1, -1, GL_FALSE }, /* Position */
GLUT_ACTION_EXIT, /* ActionOnWindowClose */
GLUT_EXEC_STATE_INIT, /* ExecState */
NULL, /* ProgramName */
GLUT_ACTION_EXIT, /* ActionOnWindowClose */
GLUT_EXEC_STATE_INIT, /* ExecState */
NULL, /* ProgramName */
- GL_FALSE /* JoysticksInitialised */
+ GL_FALSE, /* JoysticksInitialised */
+ GL_FALSE /* InputDevsInitialised */
};
};
@@
-202,6
+203,9
@@
static void fghInitialize( const char* displayName )
#endif
fgState.Initialised = GL_TRUE;
#endif
fgState.Initialised = GL_TRUE;
+
+ /* InputDevice uses GlutTimerFunc(), so fgState.Initialised must be TRUE */
+ fgInitialiseInputDevices();
}
/*
}
/*
@@
-242,8
+246,12
@@
void fgDeinitialize( void )
#if !TARGET_HOST_WINCE
if ( fgState.JoysticksInitialised )
fgJoystickClose( );
#if !TARGET_HOST_WINCE
if ( fgState.JoysticksInitialised )
fgJoystickClose( );
+
+ if ( fgState.InputDevsInitialised )
+ fgInputDeviceClose( );
#endif /* !TARGET_HOST_WINCE */
fgState.JoysticksInitialised = GL_FALSE;
#endif /* !TARGET_HOST_WINCE */
fgState.JoysticksInitialised = GL_FALSE;
+ fgState.InputDevsInitialised = GL_FALSE;
fgState.Initialised = GL_FALSE;
fgState.Initialised = GL_FALSE;