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.37.tar.gz
[xscreensaver]
/
hacks
/
glx
/
blinkbox.c
diff --git
a/hacks/glx/blinkbox.c
b/hacks/glx/blinkbox.c
index 8721a81abe6506d0056bab8a7a2a1df0b4487966..f90f7feff222822440d491d73e78644cd911eb1e 100644
(file)
--- a/
hacks/glx/blinkbox.c
+++ b/
hacks/glx/blinkbox.c
@@
-14,6
+14,7
@@
#define DEFAULTS "*delay: 30000 \n" \
"*wireframe: False \n" \
#define DEFAULTS "*delay: 30000 \n" \
"*wireframe: False \n" \
+ "*suppressRotationAnimation: True\n" \
# define refresh_ball 0
# define release_ball 0
# define refresh_ball 0
# define release_ball 0
@@
-243,6
+244,13
@@
reshape_ball (ModeInfo *mi, int width, int height)
0.0, 0.0, 0.0,
0.0, 2.0, 10.0);
0.0, 0.0, 0.0,
0.0, 2.0, 10.0);
+# ifdef HAVE_MOBILE /* Keep it the same relative size when rotated. */
+ {
+ int o = (int) current_device_rotation();
+ if (o != 0 && o != 180 && o != -180)
+ glScalef (1/h, 1/h, 1/h);
+ }
+# endif
}
static void
}
static void
@@
-288,11
+296,7
@@
init_ball (ModeInfo *mi)
int wire = MI_IS_WIREFRAME(mi);
blinkboxstruct *bp;
int wire = MI_IS_WIREFRAME(mi);
blinkboxstruct *bp;
- if(blinkbox == NULL) {
- if((blinkbox = (blinkboxstruct *) calloc(MI_NUM_SCREENS(mi),
- sizeof (blinkboxstruct))) == NULL)
- return;
- }
+ MI_INIT (mi, blinkbox, NULL);
bp = &blinkbox[MI_SCREEN(mi)];
if ((bp->glx_context = init_GL(mi)) != NULL) {
bp = &blinkbox[MI_SCREEN(mi)];
if ((bp->glx_context = init_GL(mi)) != NULL) {
@@
-401,7
+405,6
@@
init_ball (ModeInfo *mi)
glEnable(GL_COLOR_MATERIAL);
glShadeModel(GL_SMOOTH);
glEnable(GL_COLOR_MATERIAL);
glShadeModel(GL_SMOOTH);
- glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
glClearDepth(1.0f);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);