From http://www.jwz.org/xscreensaver/xscreensaver-5.18.tar.gz
[xscreensaver] / hacks / glx / menger.c
index c620dfd0cc75268b38d70814987828c7fd78d37b..2319af764055d0a0036dae2ff22dde3324423a76 100644 (file)
@@ -486,7 +486,10 @@ draw_sponge (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 (sp->trackball);
+    glRotatef(-current_device_rotation(), 0, 0, 1);
 
     get_rotation (sp->rot, &x, &y, &z, !sp->button_down_p);
     glRotatef (x * 360, 1.0, 0.0, 0.0);