From 38886de0c3e9ea5729ef23e4c653fa2822f52e8f Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 6 Apr 2021 14:43:39 +0200 Subject: xscreensaver 6.00 --- hacks/glx/morph3d.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'hacks/glx/morph3d.c') 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); -- cgit v1.2.3-55-g7522