X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fglx%2Fstairs.c;h=91f40ac46a919853c077b3b7b11a33d8ab398dce;hp=7fabea1ad32f61af464600e32f1879f7215fd976;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hpb=88cfe534a698a0562e81345957a50714af1453bc diff --git a/hacks/glx/stairs.c b/hacks/glx/stairs.c index 7fabea1a..91f40ac4 100644 --- a/hacks/glx/stairs.c +++ b/hacks/glx/stairs.c @@ -482,12 +482,6 @@ draw_stairs (ModeInfo * mi) glPushMatrix(); glRotatef(rot, 0, 0, 1); - if ((rot > 45 && rot < 135) || - (rot < -45 && rot > -135)) - { - GLfloat s = MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi); - glScalef (s, 1/s, 1); - } glTranslatef(0.0, 0.0, -10.0); @@ -497,6 +491,14 @@ draw_stairs (ModeInfo * mi) glScalef(Scale4Iconic * sp->WindH / sp->WindW, Scale4Iconic, Scale4Iconic); } +# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */ + { + GLfloat h = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi); + if (rot != 0 && rot != 180 && rot != -180) + glScalef (1/h, 1/h, 1/h); + } +# endif + gltrackball_rotate (sp->trackball); glTranslatef(0, 0.5, 0);