mirror of https://github.com/OpenTTD/OpenTTD
(svn r23749) -Fix: [Win32] Work around a possible deadlock when initialising threaded drawing.
parent
bc9c8db287
commit
52175a4260
|
@ -384,6 +384,10 @@ static void PaintWindowThread(void *)
|
||||||
_draw_mutex->BeginCritical();
|
_draw_mutex->BeginCritical();
|
||||||
_draw_mutex->SendSignal();
|
_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! */
|
/* Now wait for the first thing to draw! */
|
||||||
_draw_mutex->WaitForSignal();
|
_draw_mutex->WaitForSignal();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue