summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2014-04-27 20:55:51 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2014-06-02 13:07:17 +0100
commitaaaa41345674a1c76a70836394cb5e57f82e9a26 (patch)
tree0725b7830062cab04727a42a49f044c1c54e2df9
parentdb2e708f31a162c6c66643d3559dd5f3e21ee06b (diff)
hw/xwin: Update for __glXLastContext -> lastGLContext
Update for __glXLastContext -> lastGLContext. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
-rw-r--r--hw/xwin/glx/indirect.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 690611428..9bfaac03d 100644
--- a/hw/xwin/glx/indirect.c
+++ b/hw/xwin/glx/indirect.c
@@ -929,17 +929,6 @@ glxWinDrawableDestroy(__GLXdrawable * base)
{
__GLXWinDrawable *glxPriv = (__GLXWinDrawable *) base;
- if (glxPriv->drawContext &&
- (__glXLastContext == &((glxPriv->drawContext)->base))) {
- // if this context is current and has unflushed commands, say we have flushed them
- // (don't actually flush them, the window is going away anyhow, and an implict flush occurs
- // on the next context change)
- // (GLX core considers it an error when we try to select a new current context if the old one
- // has unflushed commands, but the window has disappeared..)
- __glXLastContext->hasUnflushedCommands = FALSE;
- __glXLastContext = NULL;
- }
-
if (glxPriv->hPbuffer)
if (!wglDestroyPbufferARBWrapper(glxPriv->hPbuffer)) {
ErrorF("wglDestroyPbufferARB failed: %s\n", glxWinErrorMessage());
@@ -1542,7 +1531,7 @@ glxWinContextLoseCurrent(__GLXcontext * base)
An error seems to be reported if we try to make no context current
if there is already no current context, so avoid doing that...
*/
- if (__glXLastContext != NULL) {
+ if (wglGetCurrentContext() != NULL) {
ret = wglMakeCurrent(NULL, NULL); /* We don't need a DC when setting no current context */
if (!ret)
ErrorF("glxWinContextLoseCurrent error: %s\n",