diff options
author | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:41 +0100 |
commit | ae69a754244c4e475c8d2591772ca8e005071d83 (patch) | |
tree | 58b3fa7abc2dcfe3c23e1c0ce108950c720826ab /hacks/glx/gflux.c | |
parent | Update gitignore (diff) | |
download | xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.gz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.tar.xz xscreensaver-ae69a754244c4e475c8d2591772ca8e005071d83.zip |
Update to 5.42
Diffstat (limited to 'hacks/glx/gflux.c')
-rw-r--r-- | hacks/glx/gflux.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/hacks/glx/gflux.c b/hacks/glx/gflux.c index dbbb11c..63c9676 100644 --- a/hacks/glx/gflux.c +++ b/hacks/glx/gflux.c @@ -46,7 +46,6 @@ "*useSHM: True \n" \ "*suppressRotationAnimation: True\n" \ -# define free_gflux 0 # define release_gflux 0 # include "xlockmore.h" /* from the xscreensaver distribution */ #else /* !STANDALONE */ @@ -275,7 +274,7 @@ ENTRYPOINT void draw_gflux(ModeInfo * mi) /* Just keep running before the texture has come in. */ /* if (gp->waiting_for_image_p) return; */ - glXMakeCurrent(display, window, *(gp->glx_context)); + glXMakeCurrent(display, window, *gp->glx_context); calcGrid(gp); mi->polygon_count = gp->drawFunc(gp); @@ -382,6 +381,7 @@ ENTRYPOINT void init_gflux(ModeInfo * mi) progname, s); exit (1); } + if (s) free (s); } gp->modeinfo = mi; @@ -394,6 +394,14 @@ ENTRYPOINT void init_gflux(ModeInfo * mi) } } +ENTRYPOINT void free_gflux(ModeInfo * mi) +{ + gfluxstruct *gp = &gfluxes[MI_SCREEN(mi)]; + if (!gp->glx_context) return; + glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *gp->glx_context); + gltrackball_free (gp->trackball); + if (gp->texName) glDeleteTextures (1, &gp->texName); +} static void createTexture(gfluxstruct *gp) { |