diff options
author | Simon Rettberg | 2021-04-06 14:43:39 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-04-07 13:38:37 +0200 |
commit | 38886de0c3e9ea5729ef23e4c653fa2822f52e8f (patch) | |
tree | 9b799c8c968a92cc77746a95e0e8bdd90b6b13c3 /hacks/glx/engine.c | |
parent | Maybe not remove, but ... (diff) | |
download | xscreensaver-38886de0c3e9ea5729ef23e4c653fa2822f52e8f.tar.gz xscreensaver-38886de0c3e9ea5729ef23e4c653fa2822f52e8f.tar.xz xscreensaver-38886de0c3e9ea5729ef23e4c653fa2822f52e8f.zip |
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); |