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/glknots.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'hacks/glx/glknots.c') diff --git a/hacks/glx/glknots.c b/hacks/glx/glknots.c index 730cadb..06be339 100644 --- a/hacks/glx/glknots.c +++ b/hacks/glx/glknots.c @@ -18,7 +18,6 @@ "*wireframe: False \n" \ "*suppressRotationAnimation: True\n" \ -# define free_knot 0 # define release_knot 0 #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) @@ -348,7 +347,7 @@ draw_knot (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); if (bp->mode == 0) { @@ -440,6 +439,19 @@ draw_knot (ModeInfo *mi) glXSwapBuffers(dpy, window); } + +ENTRYPOINT void +free_knot (ModeInfo *mi) +{ + knot_configuration *bp = &bps[MI_SCREEN(mi)]; + 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->colors) free (bp->colors); + if (glIsList(bp->knot_list)) glDeleteLists(bp->knot_list, 1); +} + XSCREENSAVER_MODULE_2 ("GLKnots", glknots, knot) #endif /* USE_GL */ -- cgit v1.2.3-55-g7522