Removing some duplicate code from "freeglut_init.c" and its Windows version
[freeglut] / src / mswin / freeglut_init_mswin.c
index c134a63..772116c 100644 (file)
@@ -129,14 +129,12 @@ void fghInitialize( const char* displayName )
 \r
 \r
 /* Platform-Specific Deinitialization Functions: */\r
+extern void fghCloseInputDevices ( void );\r
+\r
 void fghDeinitialiseInputDevices ( void )\r
 {\r
 #if !defined(_WIN32_WCE)\r
-    if ( fgState.JoysticksInitialised )\r
-        fgJoystickClose( );\r
-\r
-    if ( fgState.InputDevsInitialised )\r
-        fgInputDeviceClose( );\r
+       fghCloseInputDevices ();\r
 #endif /* !defined(_WIN32_WCE) */\r
     fgState.JoysticksInitialised = GL_FALSE;\r
     fgState.InputDevsInitialised = GL_FALSE;\r