From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / glx / blinkbox.c
index 2b3802c8856ccc753d2729d375a7ddec6f2dd8d2..ba4693815f6d474d64d0eb54881267fae92eb4ac 100644 (file)
@@ -14,6 +14,7 @@
 
 #define DEFAULTS       "*delay:        30000            \n" \
                        "*wireframe:    False            \n" \
+                       "*suppressRotationAnimation: True\n" \
 
 # define refresh_ball 0
 # define release_ball 0
@@ -243,6 +244,13 @@ reshape_ball (ModeInfo *mi, int width, int height)
              0.0, 0.0, 0.0,
              0.0, 2.0,  10.0);
 
+# ifdef HAVE_MOBILE    /* Keep it the same relative size when rotated. */
+  {
+    int o = (int) current_device_rotation();
+    if (o != 0 && o != 180 && o != -180)
+      glScalef (1/h, 1/h, 1/h);
+  }
+# endif
 }
 
 static void