aboutsummaryrefslogtreecommitdiffstats
path: root/progs/wgl
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-06-17 15:22:32 +0100
committerJosé Fonseca <[email protected]>2009-06-17 15:23:25 +0100
commit6e24fdeae5038b63b6b0f94b05d4529a5f62d6ae (patch)
tree1f30602dbc9313d65bac139a2adec21aef214aa9 /progs/wgl
parent557421b6de9d8cba7e71828ec3a60a344fff9e88 (diff)
progs/wgl: Tweak the initialization wait in wglthreads.
There was still a non-zero probability for wglShareLists of failing.
Diffstat (limited to 'progs/wgl')
-rw-r--r--progs/wgl/wglthreads/wglthreads.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/progs/wgl/wglthreads/wglthreads.c b/progs/wgl/wglthreads/wglthreads.c
index 405b5db8842..27dca10f2a0 100644
--- a/progs/wgl/wglthreads/wglthreads.c
+++ b/progs/wgl/wglthreads/wglthreads.c
@@ -507,9 +507,9 @@ ThreadProc(void *p)
struct winthread *wt = (struct winthread *) p;
HGLRC share;
- /* Wait for first thread context */
+ /* Wait for the previous thread */
if(Texture && wt->Index > 0) {
- WaitForSingleObject(WinThreads[0].hEventInitialised, INFINITE);
+ WaitForSingleObject(WinThreads[wt->Index - 1].hEventInitialised, INFINITE);
share = WinThreads[0].Context;
}
else