summaryrefslogtreecommitdiffstats
path: root/hacks/glx/antinspect.c
diff options
context:
space:
mode:
Diffstat (limited to 'hacks/glx/antinspect.c')
-rw-r--r--hacks/glx/antinspect.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/hacks/glx/antinspect.c b/hacks/glx/antinspect.c
index 8f2152b..913503f 100644
--- a/hacks/glx/antinspect.c
+++ b/hacks/glx/antinspect.c
@@ -25,18 +25,6 @@
#include "xlock.h"
#endif
-#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 */
-
#include "sphere.h"
#include "gltrackball.h"
@@ -656,15 +644,12 @@ ENTRYPOINT void draw_antinspect(ModeInfo * mi)
the antbubble */
glTranslatef(0.0, 0.0, -10.0);
-# 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);
- glRotatef(o, 0, 0, 1);
+ GLfloat s = (MI_WIDTH(mi) < MI_HEIGHT(mi)
+ ? (MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi))
+ : 1);
+ glScalef (s, s, s);
}
-# endif
gltrackball_rotate(mp->trackball);
glRotatef((15.0/2.0 + 15.0*sin(mp->ant_step/100.0)), 1.0, 0.0, 0.0);