X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fmoebiusgears.c;h=03381b70d6ae9b81849e34324230f0afadc2f77c;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hp=a17c67ca38ac9eef1e3e732cd772a08930771b5c;hpb=6b1c86cf395f59389e4ece4ea8f4bea2c332745b;p=xscreensaver diff --git a/hacks/glx/moebiusgears.c b/hacks/glx/moebiusgears.c index a17c67ca..03381b70 100644 --- a/hacks/glx/moebiusgears.c +++ b/hacks/glx/moebiusgears.c @@ -166,8 +166,6 @@ init_mgears (ModeInfo *mi) fprintf(stderr, "%s: out of memory\n", progname); exit(1); } - - bp = &bps[MI_SCREEN(mi)]; } bp = &bps[MI_SCREEN(mi)]; @@ -341,7 +339,10 @@ draw_mgears (ModeInfo *mi) (y - 0.5) * 4, (z - 0.5) * 7); + /* Do it twice because we don't track the device's orientation. */ + glRotatef( current_device_rotation(), 0, 0, 1); gltrackball_rotate (bp->trackball); + glRotatef(-current_device_rotation(), 0, 0, 1); get_rotation (bp->rot, &x, &y, &z, !bp->button_down_p);