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
/
dymaxionmap.c
diff --git
a/hacks/glx/dymaxionmap.c
b/hacks/glx/dymaxionmap.c
index b4e8dba50bcb2ccbe60dfc89e8765f6b1a491c97..60843e1aa7a507bd52a7604522acc369a3bf8350 100644
(file)
--- a/
hacks/glx/dymaxionmap.c
+++ b/
hacks/glx/dymaxionmap.c
@@
-21,7
+21,7
@@
"*showFPS: False \n" \
"*wireframe: False \n" \
"*labelFont: " LABEL_FONT "\n"
"*showFPS: False \n" \
"*wireframe: False \n" \
"*labelFont: " LABEL_FONT "\n"
-# define re
fresh
_planet 0
+# define re
lease
_planet 0
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
# include "xlockmore.h" /* from the xscreensaver distribution */
#else /* !STANDALONE */
# include "xlock.h" /* from the xlockmore distribution */
@@
-88,8
+88,8
@@
ENTRYPOINT ModeSpecOpt planet_opts = {countof(opts), opts, countof(vars), vars,
#ifdef USE_MODULES
ModStruct planet_description =
#ifdef USE_MODULES
ModStruct planet_description =
-{"planet", "init_planet", "draw_planet",
"release_planet"
,
- "draw_planet", "init_planet",
NULL
, &planet_opts,
+{"planet", "init_planet", "draw_planet",
NULL
,
+ "draw_planet", "init_planet",
"free_planet"
, &planet_opts,
1000, 1, 2, 1, 4, 1.0, "",
"Buckminster Fuller's unwrapped icosahedral globe", 0, NULL};
#endif
1000, 1, 2, 1, 4, 1.0, "",
"Buckminster Fuller's unwrapped icosahedral globe", 0, NULL};
#endif
@@
-776,11
+776,7
@@
init_planet (ModeInfo * mi)
int screen = MI_SCREEN(mi);
Bool wire = MI_IS_WIREFRAME(mi);
int screen = MI_SCREEN(mi);
Bool wire = MI_IS_WIREFRAME(mi);
- if (planets == NULL) {
- if ((planets = (planetstruct *) calloc(MI_NUM_SCREENS(mi),
- sizeof (planetstruct))) == NULL)
- return;
- }
+ MI_INIT (mi, planets);
gp = &planets[screen];
if ((gp->glx_context = init_GL(mi)) != NULL) {
gp = &planets[screen];
if ((gp->glx_context = init_GL(mi)) != NULL) {
@@
-1006,27
+1002,16
@@
draw_planet (ModeInfo * mi)
ENTRYPOINT void
ENTRYPOINT void
-
releas
e_planet (ModeInfo * mi)
+
fre
e_planet (ModeInfo * mi)
{
{
- if (planets != NULL) {
- int screen;
-
- for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
- planetstruct *gp = &planets[screen];
+ planetstruct *gp = &planets[MI_SCREEN(mi)];
- if (gp->glx_context) {
- /* Display lists MUST be freed while their glXContext is current. */
- /* but this gets a BadMatch error. -jwz */
- /*glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context));*/
+ if (gp->glx_context) {
+ glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context));
- if (glIsList(gp->starlist))
- glDeleteLists(gp->starlist, 1);
- }
- }
- (void) free((void *) planets);
- planets = NULL;
+ if (glIsList(gp->starlist))
+ glDeleteLists(gp->starlist, 1);
}
}
- FreeAllGL(mi);
}
}