X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fgltrackball.c;h=71775f15a3bca931e3107ed97eca8ce49585b82f;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hp=f3e02fd34f10d741682dc857b48bfe911b5d6ff9;hpb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e;p=xscreensaver diff --git a/hacks/glx/gltrackball.c b/hacks/glx/gltrackball.c index f3e02fd3..71775f15 100644 --- a/hacks/glx/gltrackball.c +++ b/hacks/glx/gltrackball.c @@ -20,7 +20,10 @@ #ifdef HAVE_COCOA # include "jwxyz.h" -#else /* !HAVE_COCOA -- real X11 */ +#elif defined(HAVE_ANDROID) +# include "jwxyz.h" +# include +#else /* real X11 */ # include # include # include @@ -39,7 +42,7 @@ #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) @@ -73,7 +76,11 @@ gltrackball_init (int ignore_device_rotation_p) 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); } @@ -234,7 +241,7 @@ gltrackball_mousewheel (trackball_state *ts, int horizontal_p; int mx, my, move, scale; -#ifdef HAVE_COCOA +#ifdef HAVE_JWXYZ flip_p = 0; /* MacOS has already handled this. */ #endif