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
|
#endif
|
||||||
|
|
||||||
#if TARGET_HOST_POSIX_X11
|
void fghCloseInputDevices ( void )
|
||||||
static void fghDeinitialiseInputDevices ( void )
|
|
||||||
{
|
{
|
||||||
if ( fgState.JoysticksInitialised )
|
if ( fgState.JoysticksInitialised )
|
||||||
fgJoystickClose( );
|
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 )
|
static void fghCloseDisplay ( void )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -129,14 +129,12 @@ void fghInitialize( const char* displayName )
|
|||||||
|
|
||||||
|
|
||||||
/* Platform-Specific Deinitialization Functions: */
|
/* Platform-Specific Deinitialization Functions: */
|
||||||
|
extern void fghCloseInputDevices ( void );
|
||||||
|
|
||||||
void fghDeinitialiseInputDevices ( void )
|
void fghDeinitialiseInputDevices ( void )
|
||||||
{
|
{
|
||||||
#if !defined(_WIN32_WCE)
|
#if !defined(_WIN32_WCE)
|
||||||
if ( fgState.JoysticksInitialised )
|
fghCloseInputDevices ();
|
||||||
fgJoystickClose( );
|
|
||||||
|
|
||||||
if ( fgState.InputDevsInitialised )
|
|
||||||
fgInputDeviceClose( );
|
|
||||||
#endif /* !defined(_WIN32_WCE) */
|
#endif /* !defined(_WIN32_WCE) */
|
||||||
fgState.JoysticksInitialised = GL_FALSE;
|
fgState.JoysticksInitialised = GL_FALSE;
|
||||||
fgState.InputDevsInitialised = GL_FALSE;
|
fgState.InputDevsInitialised = GL_FALSE;
|
||||||
|
Reference in New Issue
Block a user