From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver] / hacks / glx / cubenetic.c
index 5e8c3a042309503b90aa649667ea448a279d98f2..8ae8143f0670b567d5db44e89e393ba53dd24a78 100644 (file)
@@ -560,7 +560,10 @@ draw_cube (ModeInfo *mi)
                  (y - 0.5) * 6,
                  (z - 0.5) * 15);
 
+    /* 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);