From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / hacks / glx / stonerview.c
index e504709d7b7e0dcff8dd9583b86a4b8f1f10e4b7..7e150b3963bf84a15f53b9611b7a79c933d4517b 100644 (file)
@@ -114,6 +114,15 @@ draw_stonerview (ModeInfo *mi)
   glRotatef( current_device_rotation(), 0, 0, 1);
   gltrackball_rotate (bp->trackball);
 
+# ifdef HAVE_MOBILE    /* Keep it the same relative size when rotated. */
+  {
+    GLfloat h = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi);
+    int o = (int) current_device_rotation();
+    if (o != 0 && o != 180 && o != -180)
+      glScalef (h, h, h);
+  }
+# endif
+
   stonerview_win_draw(bp->st);
   if (! bp->button_down_p)
     stonerview_move_increment(bp->st);