X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fgears.c;h=bc925dd542b37629058448af639211711e2b7624;hb=6f5482d73adb0165c0130bb47d852644ab0c4869;hp=054bc1c0a7b972d224b02ea8dc4dda64de33e1ed;hpb=6b1c86cf395f59389e4ece4ea8f4bea2c332745b;p=xscreensaver diff --git a/hacks/glx/gears.c b/hacks/glx/gears.c index 054bc1c0..bc925dd5 100644 --- a/hacks/glx/gears.c +++ b/hacks/glx/gears.c @@ -739,8 +739,6 @@ init_gears (ModeInfo *mi) fprintf(stderr, "%s: out of memory\n", progname); exit(1); } - - bp = &bps[MI_SCREEN(mi)]; } bp = &bps[MI_SCREEN(mi)]; @@ -871,7 +869,10 @@ draw_gears (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);