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/engine.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'hacks/glx/engine.c') diff --git a/hacks/glx/engine.c b/hacks/glx/engine.c index ba30d81..cdc68f9 100644 --- a/hacks/glx/engine.c +++ b/hacks/glx/engine.c @@ -25,7 +25,7 @@ #define DEFAULTS "*delay: 30000 \n" \ "*showFPS: False \n" \ "*suppressRotationAnimation: True\n" \ - "*titleFont: -*-helvetica-medium-r-normal-*-*-180-*-*-*-*-*-*\n" \ + "*titleFont: sans-serif 18\n" \ # define release_engine 0 # include "xlockmore.h" /* from the xscreensaver distribution */ @@ -49,9 +49,6 @@ #define DEF_SPIN "True" #define DEF_MOVE "True" -#undef countof -#define countof(x) (sizeof((x))/sizeof((*x))) - static char *which_engine; static int move; static int spin; @@ -619,14 +616,12 @@ static int display(ModeInfo *mi) 0.0, 1.0, 0.0); glPushMatrix(); -# 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, 1/h, 1/h); + GLfloat s = (MI_WIDTH(mi) < MI_HEIGHT(mi) + ? (MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi)) + : 1); + glScalef (s, s, s); } -# endif glLightfv(GL_LIGHT0, GL_POSITION, lightpos); glLightfv(GL_LIGHT0, GL_SPECULAR, light_sp); -- cgit v1.2.3-55-g7522