From 1cd5a38a3e02bbc42a8ccf6c16da3c8a8e007b7b Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 13 Apr 2013 15:29:50 +0000 Subject: [PATCH] fix deadlock issues on xp, hopefully. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4319 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/snd_directx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/client/snd_directx.c b/engine/client/snd_directx.c index aa94e2db2..34a7c07b0 100644 --- a/engine/client/snd_directx.c +++ b/engine/client/snd_directx.c @@ -961,6 +961,7 @@ static int DSOUND_InitCard (soundcardinfo_t *sc, int cardnum) sc->audio_fd = cardnum; sc->selfpainting = true; sc->handle = cond = Sys_CreateConditional(); + Sys_LockConditional(cond); sc->thread = Sys_CreateThread("dsoundmixer", DSOUND_Thread, sc, THREADP_HIGHEST, 0); if (!sc->thread) { @@ -970,6 +971,7 @@ static int DSOUND_InitCard (soundcardinfo_t *sc, int cardnum) //wait for the thread to finish (along with all its error con printfs etc Sys_ConditionWait(cond); + Sys_UnlockConditional(cond); Sys_DestroyConditional(cond); if (!sc->selfpainting)