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
/
morph3d.c
diff --git
a/hacks/glx/morph3d.c
b/hacks/glx/morph3d.c
index c1675aeb1ba8d41b4062c47bef926e229cab6b58..e96309acc5817fd2f1f3d2571e481a9f40dc9915 100644
(file)
--- a/
hacks/glx/morph3d.c
+++ b/
hacks/glx/morph3d.c
@@
-55,7
+55,9
@@
static const char sccsid[] = "@(#)morph3d.c 5.01 2001/03/01 xlockmore";
# define MODE_moebius
# define DEFAULTS "*delay: 40000 \n" \
"*showFPS: False \n" \
# define MODE_moebius
# define DEFAULTS "*delay: 40000 \n" \
"*showFPS: False \n" \
- "*count: 0 \n"
+ "*count: 0 \n" \
+ "*suppressRotationAnimation: True\n" \
+
# define refresh_morph3d 0
# define morph3d_handle_event 0
# include "xlockmore.h" /* from the xscreensaver distribution */
# define refresh_morph3d 0
# define morph3d_handle_event 0
# include "xlockmore.h" /* from the xscreensaver distribution */
@@
-770,6
+772,15
@@
draw_morph3d(ModeInfo * mi)
glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic);
}
glScalef(Scale4Iconic * mp->WindH / mp->WindW, Scale4Iconic, Scale4Iconic);
}
+# 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, h, 1);
+ }
+# endif
+
glRotatef(mp->step * 100, 1, 0, 0);
glRotatef(mp->step * 95, 0, 1, 0);
glRotatef(mp->step * 90, 0, 0, 1);
glRotatef(mp->step * 100, 1, 0, 0);
glRotatef(mp->step * 95, 0, 1, 0);
glRotatef(mp->step * 90, 0, 0, 1);