android: make code 're-entrant' - i.e. NativeActivity can restart the program without...
[freeglut] / src / android / fg_init_android.c
index 70b276c..06ffa58 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * freeglut_init_android.c
+ * fg_init_android.c
  *
  * Various freeglut initialization functions.
  *
@@ -25,6 +25,8 @@
 
 #include <GL/freeglut.h>
 #include "fg_internal.h"
+#include "fg_init.h"
+#include "egl/fg_init_egl.h"
 
 void fgPlatformInitialize()
 {
@@ -36,3 +38,13 @@ void fgPlatformCloseDisplay()
 {
   fghPlatformCloseDisplayEGL();
 }
+
+/**
+ * Close joystick and serial input devices
+ */
+void fgPlatformDeinitialiseInputDevices ( void )
+{
+    fghCloseInputDevices ();
+    fgState.JoysticksInitialised = GL_FALSE;
+    fgState.InputDevsInitialised = GL_FALSE;
+}