From 6e24fdeae5038b63b6b0f94b05d4529a5f62d6ae Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Wed, 17 Jun 2009 15:22:32 +0100 Subject: progs/wgl: Tweak the initialization wait in wglthreads. There was still a non-zero probability for wglShareLists of failing. --- progs/wgl/wglthreads/wglthreads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'progs/wgl/wglthreads/wglthreads.c') diff --git a/progs/wgl/wglthreads/wglthreads.c b/progs/wgl/wglthreads/wglthreads.c index 405b5db884..27dca10f2a 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 -- cgit v1.2.3