X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fgltrackball.c;h=93d4c54263ef97e2610616d794013e10f0acbc5d;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hp=d02e316ae62e85a1b9f1cade3f3055bcca0b7013;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/glx/gltrackball.c b/hacks/glx/gltrackball.c index d02e316a..93d4c542 100644 --- a/hacks/glx/gltrackball.c +++ b/hacks/glx/gltrackball.c @@ -1,4 +1,4 @@ -/* gltrackball, Copyright (c) 2002-2008 Jamie Zawinski +/* gltrackball, Copyright (c) 2002-2012 Jamie Zawinski * GL-flavored wrapper for trackball.c * * Permission to use, copy, modify, distribute, and sell this software and its @@ -18,15 +18,19 @@ # include "config.h" #endif -#ifdef HAVE_COCOA -# include -#else +#ifndef HAVE_COCOA # include #endif +#ifdef HAVE_JWZGLES +# include "jwzgles.h" +#endif /* HAVE_JWZGLES */ + #include "trackball.h" #include "gltrackball.h" +extern double current_device_rotation (void); /* Bah, it's in fps.h */ + struct trackball_state { int x, y; GLfloat q[4]; @@ -53,6 +57,7 @@ gltrackball_reset (trackball_state *ts) trackball (ts->q, 0, 0, 0, 0); } + /* Begin tracking the mouse: Call this when the mouse button goes down. x and y are the mouse position relative to the window. w and h are the size of the window.