From 96d9dda5334c63cbe46ecc654bf76167541d537a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Tue, 11 Oct 2011 19:33:22 +0100 Subject: [PATCH] Fix retracing of wglShareLists for currently bound contexts. --- glretrace_wgl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/glretrace_wgl.cpp b/glretrace_wgl.cpp index 7df2485..8f6a624 100644 --- a/glretrace_wgl.cpp +++ b/glretrace_wgl.cpp @@ -116,8 +116,13 @@ static void retrace_wglShareLists(Trace::Call &call) { glws::Context *new_context = glws::createContext(old_context->visual, share_context); if (new_context) { - delete old_context; + if (context == old_context) { + glws::makeCurrent(drawable, new_context); + } + context_map[hglrc2] = new_context; + + delete old_context; } } -- 2.7.4