X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fstonerview.c;h=7e150b3963bf84a15f53b9611b7a79c933d4517b;hp=e504709d7b7e0dcff8dd9583b86a4b8f1f10e4b7;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hpb=88cfe534a698a0562e81345957a50714af1453bc diff --git a/hacks/glx/stonerview.c b/hacks/glx/stonerview.c index e504709d..7e150b39 100644 --- a/hacks/glx/stonerview.c +++ b/hacks/glx/stonerview.c @@ -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);