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/polyhedra-gl.c | |
parent | Maybe not remove, but ... (diff) | |
download | xscreensaver-openslx.tar.gz xscreensaver-openslx.tar.xz xscreensaver-openslx.zip |
Diffstat (limited to 'hacks/glx/polyhedra-gl.c')
-rw-r--r-- | hacks/glx/polyhedra-gl.c | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/hacks/glx/polyhedra-gl.c b/hacks/glx/polyhedra-gl.c index 00f6bd4..d433d7a 100644 --- a/hacks/glx/polyhedra-gl.c +++ b/hacks/glx/polyhedra-gl.c @@ -18,37 +18,15 @@ #define DEFAULTS "*delay: 30000 \n" \ "*showFPS: False \n" \ "*wireframe: False \n" \ - "*titleFont: -*-helvetica-medium-r-normal-*-*-140-*-*-*-*-*-*\n" \ - "*titleFont2: -*-helvetica-medium-r-normal-*-*-100-*-*-*-*-*-*\n" \ - "*titleFont3: -*-helvetica-medium-r-normal-*-*-80-*-*-*-*-*-*\n" \ - "*suppressRotationAnimation: True\n" \ + "*titleFont: sans-serif 14\n" \ + "*titleFont2: sans-serif 10\n" \ + "*titleFont3: sans-serif 8\n" \ + "*suppressRotationAnimation: True\n" \ # define release_polyhedra 0 -#undef countof -#define countof(x) (sizeof((x))/sizeof((*x))) #include "xlockmore.h" - -#ifdef HAVE_JWXYZ -# include "jwxyz.h" -#else -# include <X11/Xlib.h> -# include <GL/gl.h> -# include <GL/glu.h> -#endif - -#ifdef HAVE_JWZGLES -# include "jwzgles.h" -#endif /* HAVE_JWZGLES */ - -#define DEF_SPIN "True" -#define DEF_WANDER "True" -#define DEF_SPEED "1.0" -#define DEF_TITLES "True" -#define DEF_DURATION "12" -#define DEF_WHICH "random" - #include "texfont.h" #include "normals.h" #include "polyhedra.h" @@ -57,6 +35,13 @@ #include "gltrackball.h" #include "teapot.h" +#define DEF_SPIN "True" +#define DEF_WANDER "True" +#define DEF_SPEED "1.0" +#define DEF_TITLES "True" +#define DEF_DURATION "12" +#define DEF_WHICH "random" + #ifndef HAVE_JWXYZ # define XK_MISCELLANY # include <X11/keysymdef.h> @@ -625,14 +610,12 @@ draw_polyhedra (ModeInfo *mi) 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 glScalef(1.1, 1.1, 1.1); |