fix deadlock issues on xp, hopefully.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4319 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2013-04-13 15:29:50 +00:00
parent 6ce12710eb
commit 1cd5a38a3e
1 changed files with 2 additions and 0 deletions

View File

@ -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)