diff options
author | Simon Rettberg | 2021-04-06 14:23:46 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-04-06 14:23:46 +0200 |
commit | 26b6e4255d4b9ff79a6dca10de5bec7bfc8691f9 (patch) | |
tree | a51e1637554bcd84e63cccb1cb220c898a2c4ee8 /hacks/glx/engine.c | |
parent | 5.44 (diff) | |
download | xscreensaver-26b6e4255d4b9ff79a6dca10de5bec7bfc8691f9.tar.gz xscreensaver-26b6e4255d4b9ff79a6dca10de5bec7bfc8691f9.tar.xz xscreensaver-26b6e4255d4b9ff79a6dca10de5bec7bfc8691f9.zip |
xscreensaver 6.00
Diffstat (limited to 'hacks/glx/engine.c')
-rw-r--r-- | hacks/glx/engine.c | 15 |
1 files changed, 5 insertions, 10 deletions
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); |