Removing some duplicate code from "freeglut_init.c" and its Windows version

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@988 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2012-01-20 04:20:28 +00:00
parent 93b2137e8f
commit c449ab244c
2 changed files with 14 additions and 7 deletions

View File

@ -322,8 +322,7 @@ static void fghInitialize( const char* displayName )
#endif
#if TARGET_HOST_POSIX_X11
static void fghDeinitialiseInputDevices ( void )
void fghCloseInputDevices ( void )
{
if ( fgState.JoysticksInitialised )
fgJoystickClose( );
@ -336,6 +335,16 @@ static void fghDeinitialiseInputDevices ( void )
}
#if TARGET_HOST_POSIX_X11
static void fghDeinitialiseInputDevices ( void )
{
fghCloseInputDevices ();
fgState.JoysticksInitialised = GL_FALSE;
fgState.InputDevsInitialised = GL_FALSE;
}
static void fghCloseDisplay ( void )
{
/*

View File

@ -129,14 +129,12 @@ void fghInitialize( const char* displayName )
/* Platform-Specific Deinitialization Functions: */
extern void fghCloseInputDevices ( void );
void fghDeinitialiseInputDevices ( void )
{
#if !defined(_WIN32_WCE)
if ( fgState.JoysticksInitialised )
fgJoystickClose( );
if ( fgState.InputDevsInitialised )
fgInputDeviceClose( );
fghCloseInputDevices ();
#endif /* !defined(_WIN32_WCE) */
fgState.JoysticksInitialised = GL_FALSE;
fgState.InputDevsInitialised = GL_FALSE;