#ifdef HAVE_COCOA
# include "jwxyz.h"
-#else /* !HAVE_COCOA -- real X11 */
+#elif defined(HAVE_ANDROID)
+# include "jwxyz.h"
+# include <GLES/gl.h>
+#else /* real X11 */
# include <X11/X.h>
# include <X11/Xlib.h>
# include <GL/gl.h>
#include "gltrackball.h"
/* Bah, copied from ../fps.h */
-#ifdef USE_IPHONE
+#ifdef HAVE_MOBILE
extern double current_device_rotation (void);
#else
# define current_device_rotation() (0)
void
gltrackball_reset (trackball_state *ts)
{
+ int bd = ts->button_down_p;
+ int ig = ts->ignore_device_rotation_p;
memset (ts, 0, sizeof(*ts));
+ ts->button_down_p = bd;
+ ts->ignore_device_rotation_p = ig;
trackball (ts->q, 0, 0, 0, 0);
}
int horizontal_p;
int mx, my, move, scale;
-#ifdef HAVE_COCOA
+#ifdef HAVE_JWXYZ
flip_p = 0; /* MacOS has already handled this. */
#endif