From ae69a754244c4e475c8d2591772ca8e005071d83 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 18 Feb 2019 11:55:41 +0100 Subject: Update to 5.42 --- hacks/glx/hilbert.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'hacks/glx/hilbert.c') diff --git a/hacks/glx/hilbert.c b/hacks/glx/hilbert.c index dbb2ce6..98faa4b 100644 --- a/hacks/glx/hilbert.c +++ b/hacks/glx/hilbert.c @@ -21,7 +21,6 @@ "*geometry: 800x800\n" \ "*suppressRotationAnimation: True\n" \ -# define free_hilbert 0 # define release_hilbert 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -987,7 +986,7 @@ draw_hilbert (ModeInfo *mi) if (!bp->glx_context) return; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); glShadeModel(GL_SMOOTH); @@ -1139,6 +1138,30 @@ draw_hilbert (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_hilbert (ModeInfo *mi) +{ + hilbert_configuration *bp = &bps[MI_SCREEN(mi)]; + int i; + + if (!bp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *bp->glx_context); + + if (bp->trackball) gltrackball_free (bp->trackball); + if (bp->rot) free_rotator (bp->rot); + if (bp->rot2) free_rotator (bp->rot2); + if (bp->colors) free (bp->colors); + if (bp->caches) + for (i = 0; i < max_depth + 2; i++) + if (bp->caches[i]) + { + free (bp->caches[i]->values); + free (bp->caches[i]); + } + /* #### free dlists */ +} + XSCREENSAVER_MODULE ("Hilbert", hilbert) #endif /* USE_GL */ -- cgit v1.2.3-55-g7522