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:
parent
93b2137e8f
commit
c449ab244c
@ -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 )
|
||||
{
|
||||
/*
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user