projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver]
/
hacks
/
glx
/
stairs.c
diff --git
a/hacks/glx/stairs.c
b/hacks/glx/stairs.c
index 7fabea1ad32f61af464600e32f1879f7215fd976..91f40ac46a919853c077b3b7b11a33d8ab398dce 100644
(file)
--- a/
hacks/glx/stairs.c
+++ b/
hacks/glx/stairs.c
@@
-482,12
+482,6
@@
draw_stairs (ModeInfo * mi)
glPushMatrix();
glRotatef(rot, 0, 0, 1);
glPushMatrix();
glRotatef(rot, 0, 0, 1);
- if ((rot > 45 && rot < 135) ||
- (rot < -45 && rot > -135))
- {
- GLfloat s = MI_WIDTH(mi) / (GLfloat) MI_HEIGHT(mi);
- glScalef (s, 1/s, 1);
- }
glTranslatef(0.0, 0.0, -10.0);
glTranslatef(0.0, 0.0, -10.0);
@@
-497,6
+491,14
@@
draw_stairs (ModeInfo * mi)
glScalef(Scale4Iconic * sp->WindH / sp->WindW, Scale4Iconic, Scale4Iconic);
}
glScalef(Scale4Iconic * sp->WindH / sp->WindW, Scale4Iconic, Scale4Iconic);
}
+# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */
+ {
+ GLfloat h = MI_HEIGHT(mi) / (GLfloat) MI_WIDTH(mi);
+ if (rot != 0 && rot != 180 && rot != -180)
+ glScalef (1/h, 1/h, 1/h);
+ }
+# endif
+
gltrackball_rotate (sp->trackball);
glTranslatef(0, 0.5, 0);
gltrackball_rotate (sp->trackball);
glTranslatef(0, 0.5, 0);