From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / glx / sierpinski3d.c
index 7b74d5a58aff732bafbb9e3c72cfcecdec983982..5be6862cd7c5e2dc50b9de3d20c83cd1cd4f783f 100644 (file)
@@ -30,6 +30,7 @@ static const char sccsid[] = "@(#)sierpinski3D.c      00.01 99/11/04 xlockmore";
 # define DEFAULTS                                      "*delay:                20000   \n"                     \
                                                                        "*showFPS:      False   \n"                     \
                                                                        "*wireframe:    False   \n"                     \
+                                                                       "*suppressRotationAnimation: True\n" \
 
 # define refresh_gasket 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
@@ -396,6 +397,14 @@ reshape_gasket(ModeInfo *mi, int width, int height)
              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);
 }