|| ( defined(__CYGWIN__) && defined(X_DISPLAY_MISSING) )
# define TARGET_HOST_MS_WINDOWS 1
+#elif defined (ANDROID)
+# define TARGET_HOST_ANDROID 1
+
#elif defined(__posix__) || defined(__unix__) || defined(__linux__) || defined(__sun)
# define TARGET_HOST_POSIX_X11 1
#endif
/* General defines */
-
#define INVALID_MODIFIERS 0xffffffff
+/* FreeGLUT internal time type */
+#if defined(HAVE_STDINT_H)
+# include <stdint.h>
+ typedef uint64_t fg_time_t;
+#elif defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+ typedef uint64_t fg_time_t;
+#elif defined(HAVE_ULONG_LONG)
+ typedef unsigned long long fg_time_t;
+#else
+ typedef unsigned long fg_time_t;
+#endif
+
/* Platform-specific includes */
#if TARGET_HOST_MS_WINDOWS
#include "../mswin/freeglut_internal_mswin.h"
#endif
+#if TARGET_HOST_ANDROID
+#include "../android/freeglut_internal_android.h"
+#endif
/* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
GLuint SwapCount; /* Count of glutSwapBuffer calls */
GLuint SwapTime; /* Time of last SwapBuffers */
- unsigned long Time; /* Time that glutInit was called */
+ fg_time_t Time; /* Time that glutInit was called */
SFG_List Timers; /* The freeglut timer hooks */
SFG_List FreeTimers; /* The unused timer hooks */
SFG_Node Node;
int ID; /* The timer ID integer */
FGCBTimer Callback; /* The timer callback */
- long TriggerTime; /* The timer trigger time */
+ fg_time_t TriggerTime; /* The timer trigger time */
};
/*
int Cursor; /* The currently selected cursor */
long JoystickPollRate; /* The joystick polling rate */
- long JoystickLastPoll; /* When the last poll happened */
+ fg_time_t JoystickLastPoll; /* When the last poll happened */
int MouseX, MouseY; /* The most recent mouse position */
void fgDisplayMenu( void );
/* Elapsed time as per glutGet(GLUT_ELAPSED_TIME). */
-long fgElapsedTime( void );
+fg_time_t fgElapsedTime( void );
/* System time in milliseconds */
-long unsigned fgSystemTime(void);
+fg_time_t fgSystemTime(void);
/* List functions */
void fgListInit(SFG_List *list);