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.38.tar.gz
[xscreensaver]
/
hacks
/
glx
/
splitflap.c
diff --git
a/hacks/glx/splitflap.c
b/hacks/glx/splitflap.c
index 8a0df74cc97921694add922e0265ea216a1e67d9..cf4e762339af1c6e3cf8bdd13b2965ef1ceee2a7 100644
(file)
--- a/
hacks/glx/splitflap.c
+++ b/
hacks/glx/splitflap.c
@@
-26,7
+26,7
@@
"*program: xscreensaver-text\n" \
"*usePty: False\n"
"*program: xscreensaver-text\n" \
"*usePty: False\n"
-# define re
fresh
_splitflap 0
+# define re
lease
_splitflap 0
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
#undef countof
#define countof(x) (sizeof((x))/sizeof((*x)))
@@
-213,6
+213,14
@@
reshape_splitflap (ModeInfo *mi, int width, int height)
0, 0, 0,
0, 1, 0);
0, 0, 0,
0, 1, 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 (h, h, h);
+ }
+# endif
+
glClear(GL_COLOR_BUFFER_BIT);
}
glClear(GL_COLOR_BUFFER_BIT);
}
@@
-291,14
+299,7
@@
init_splitflap (ModeInfo *mi)
splitflap_configuration *bp;
int wire = MI_IS_WIREFRAME(mi);
int i;
splitflap_configuration *bp;
int wire = MI_IS_WIREFRAME(mi);
int i;
- if (!bps) {
- bps = (splitflap_configuration *)
- calloc (MI_NUM_SCREENS(mi), sizeof (splitflap_configuration));
- if (!bps) {
- fprintf(stderr, "%s: out of memory\n", progname);
- exit(1);
- }
- }
+ MI_INIT (mi, bps);
bp = &bps[MI_SCREEN(mi)];
bp->glx_context = init_GL(mi);
bp = &bps[MI_SCREEN(mi)];
bp->glx_context = init_GL(mi);
@@
-1362,7
+1363,7
@@
draw_splitflap (ModeInfo *mi)
? grid_width * r
: grid_height);
GLfloat s = 8;
? grid_width * r
: grid_height);
GLfloat s = 8;
-# ifdef
USE_IPHON
E
+# ifdef
HAVE_MOBIL
E
s *= 2; /* #### What. Why is this necessary? */
#endif
s /= cells;
s *= 2; /* #### What. Why is this necessary? */
#endif
s /= cells;
@@
-1393,11
+1394,12
@@
draw_splitflap (ModeInfo *mi)
}
ENTRYPOINT void
}
ENTRYPOINT void
-
releas
e_splitflap (ModeInfo *mi)
+
fre
e_splitflap (ModeInfo *mi)
{
splitflap_configuration *bp = &bps[MI_SCREEN(mi)];
if (bp->tc)
textclient_close (bp->tc);
{
splitflap_configuration *bp = &bps[MI_SCREEN(mi)];
if (bp->tc)
textclient_close (bp->tc);
+ bp->tc = 0;
/* #### bp->texinfo */
}
/* #### bp->texinfo */
}