summaryrefslogtreecommitdiffstats
path: root/hacks/glx/morph3d.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/morph3d.c')
-rw-r--r--hacks/glx/morph3d.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/hacks/glx/morph3d.c b/hacks/glx/morph3d.c
index 0f37223..0cfddbb 100644
--- a/hacks/glx/morph3d.c
+++ b/hacks/glx/morph3d.c
@@ -774,14 +774,12 @@ draw_morph3d(ModeInfo * mi)
glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic);
}
-# 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 (1/h, h, 1);
+ GLfloat s = (MI_WIDTH(mi) < MI_HEIGHT(mi)
+ ? (MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi))
+ : 1);
+ glScalef (s, s, s);
}
-# endif
glRotatef(mp->step * 100, 1, 0, 0);
glRotatef(mp->step * 95, 0, 1, 0);