From 52175a4260ae01e423ecbc401bbd262e8b45794f Mon Sep 17 00:00:00 2001 From: michi_cc Date: Wed, 4 Jan 2012 00:45:36 +0000 Subject: (svn r23749) -Fix: [Win32] Work around a possible deadlock when initialising threaded drawing. --- src/video/win32_v.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/video') diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 934acc061..270af12e8 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -384,6 +384,10 @@ static void PaintWindowThread(void *) _draw_mutex->BeginCritical(); _draw_mutex->SendSignal(); + /* Do our best to make sure the main thread is the one that + * gets the signal, and not our wait below. */ + Sleep(0); + /* Now wait for the first thing to draw! */ _draw_mutex->WaitForSignal(); -- cgit v1.2.3-54-g00ecf