X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fglx%2Fgflux.c;h=dbbb11c097e462f8093a214976109811ee54f384;hb=39809ded547bdbb08207d3e514950425215b4410;hp=1e6daed2578b16b090439049423b2659e0710ab3;hpb=aa75c7476aeaa84cf3abc192b376a8b03c325213;p=xscreensaver diff --git a/hacks/glx/gflux.c b/hacks/glx/gflux.c index 1e6daed2..dbbb11c0 100644 --- a/hacks/glx/gflux.c +++ b/hacks/glx/gflux.c @@ -46,7 +46,8 @@ "*useSHM: True \n" \ "*suppressRotationAnimation: True\n" \ -# define refresh_gflux 0 +# define free_gflux 0 +# define release_gflux 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ # include "xlock.h" /* from the xlockmore distribution */ @@ -168,7 +169,7 @@ ENTRYPOINT ModeSpecOpt gflux_opts = {countof(opts), opts, countof(vars), vars, d #ifdef USE_MODULES ModStruct gflux_description = -{"gflux", "init_gflux", "draw_gflux", "release_gflux", +{"gflux", "init_gflux", "draw_gflux", NULL, "draw_gflux", "init_gflux", NULL, &gflux_opts, 1000, 1, 2, 1, 4, 1.0, "", "GFlux: an OpenGL gflux", 0, NULL}; @@ -358,11 +359,7 @@ ENTRYPOINT void init_gflux(ModeInfo * mi) int screen = MI_SCREEN(mi); gfluxstruct *gp; - if (gfluxes == NULL) { - if ((gfluxes = (gfluxstruct *) - calloc(MI_NUM_SCREENS(mi), sizeof (gfluxstruct))) == NULL) - return; - } + MI_INIT(mi, gfluxes); gp = &gfluxes[screen]; gp->trackball = gltrackball_init (True); @@ -397,16 +394,6 @@ ENTRYPOINT void init_gflux(ModeInfo * mi) } } -/* cleanup code */ -ENTRYPOINT void release_gflux(ModeInfo * mi) -{ - if (gfluxes != NULL) { - free((void *) gfluxes); - gfluxes = NULL; - } - FreeAllGL(mi); -} - static void createTexture(gfluxstruct *gp) {