From 7a96bc7c3af9d3a092ab320774de24d199ef844e Mon Sep 17 00:00:00 2001 From: zeromus <zeromus@users.sf.net> Date: Tue, 26 Jan 2010 17:47:56 +0000 Subject: [PATCH] win32: fix occasional race condition crash in subsequent rom loads --- desmume/src/windows/snddx.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/desmume/src/windows/snddx.cpp b/desmume/src/windows/snddx.cpp index 0a3ab917b..dd63e9d2d 100755 --- a/desmume/src/windows/snddx.cpp +++ b/desmume/src/windows/snddx.cpp @@ -1,7 +1,6 @@ /* snddx.cpp - Copyright (C) 2005-2007 Theo Berkau - Copyright (C) 2008-2009 DeSmuME team + Copyright (C) 2008-2010 DeSmuME team This file is part of DeSmuME @@ -203,9 +202,9 @@ void SNDDXDeInit() DWORD status=0; doterminate = true; - while(!terminated) { + while(!terminated) Sleep(1); - } + terminated = false; if (lpDSB2) {