From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / glx / surfaces.c
index ddca134794a17cb9e54220daf22188350671795b..9ea84cddfa07cd12ad4f10413e24efc448f1b6cc 100644 (file)
@@ -43,7 +43,8 @@
 
 #ifdef STANDALONE
 # define DEFAULTS                   "*delay:        20000   \n" \
-                                    "*showFPS:      False   \n"
+                                    "*showFPS:      False   \n" \
+                                  "*suppressRotationAnimation: True\n" \
 
 # define refresh_surface 0
 # include "xlockmore.h"     /* from the xscreensaver distribution */
@@ -428,6 +429,14 @@ ENTRYPOINT void reshape_surface(ModeInfo *mi, int width, int height)
   glLoadIdentity();
   gluLookAt(0.0, 0.0, 30.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.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
+
   glClear(GL_COLOR_BUFFER_BIT);
 }