From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver] / hacks / glx / spheremonics.c
index 4ad36c8e170ad98bd5ed9e750e8dd780741bfcb3..0da7b0c77c49e94aba190178a8e3618fc9d84db3 100644 (file)
@@ -851,7 +851,10 @@ draw_spheremonics (ModeInfo *mi)
                  (y - 0.5) * 6,
                  (z - 0.5) * 8);
 
+    /* Do it twice because we don't track the device's orientation. */
+    glRotatef( current_device_rotation(), 0, 0, 1);
     gltrackball_rotate (cc->trackball);
+    glRotatef(-current_device_rotation(), 0, 0, 1);
 
     get_rotation (cc->rot, &x, &y, &z, !cc->button_down_p);
     glRotatef (x * 360, 1.0, 0.0, 0.0);