diff options
author | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
---|---|---|
committer | Simon Rettberg | 2019-02-18 11:55:58 +0100 |
commit | aa7530630e595b80d5db54655fd827b61edc0fd7 (patch) | |
tree | 048cb74072450c7592f254c3537ac8f252d09d73 /hacks/glx/blocktube.c | |
parent | Forgot one DPMS killing instance (diff) | |
parent | Update to 5.42 (diff) | |
download | xscreensaver-23.tar.gz xscreensaver-23.tar.xz xscreensaver-23.zip |
Merge branch 'master' into openslxv23
Diffstat (limited to 'hacks/glx/blocktube.c')
-rw-r--r-- | hacks/glx/blocktube.c | 19 |
1 files changed, 9 insertions, 10 deletions
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); |