summaryrefslogtreecommitdiffstats
path: root/hacks/glx/engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/engine.c')
-rw-r--r--hacks/glx/engine.c15
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);