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/blocktube.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'hacks/glx/blocktube.c') diff --git a/hacks/glx/blocktube.c b/hacks/glx/blocktube.c index d4a402e..811b185 100644 --- a/hacks/glx/blocktube.c +++ b/hacks/glx/blocktube.c @@ -291,14 +291,13 @@ ENTRYPOINT void free_blocktube (ModeInfo *mi) { blocktube_configuration *lp = &lps[MI_SCREEN(mi)]; # if defined ( I_HAVE_XPM ) - if (lp->glx_context) { - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context)); - - if (lp->envTexture) - glDeleteTextures(1, &lp->envTexture); - if (lp->texti) - XDestroyImage(lp->texti); - } + if (!lp->glx_context) return; + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *lp->glx_context); + if (lp->envTexture) glDeleteTextures(1, &lp->envTexture); + if (lp->texti) XDestroyImage(lp->texti); + if (glIsList(lp->block_dlist)) glDeleteLists(lp->block_dlist, 1); + if (lp->envTexture) glDeleteTextures (1, &lp->envTexture); + # endif } @@ -308,7 +307,7 @@ ENTRYPOINT void reshape_blocktube (ModeInfo *mi, int width, int height) GLfloat h = (GLfloat) height / (GLfloat) width; int y = 0; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *lp->glx_context); if (width > height * 5) { /* tiny window: show middle */ height = width; @@ -421,7 +420,7 @@ draw_blocktube (ModeInfo *mi) mi->polygon_count = 0; - glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context)); + glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *lp->glx_context); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); -- cgit v1.2.3-55-g7522