From dfc40129936e15793b8739772e19af52ad22c805 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Sun, 28 May 2006 23:45:32 +0000
Subject: [PATCH] Fixing Win32 bugs.

---
 src/xpdev/xpbeep.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/xpdev/xpbeep.c b/src/xpdev/xpbeep.c
index f47d9e1c6e..21ad357e52 100644
--- a/src/xpdev/xpbeep.c
+++ b/src/xpdev/xpbeep.c
@@ -445,11 +445,10 @@ BOOL DLLCALL xptone(double freq, DWORD duration, enum WAVE_SHAPE shape)
 
 		makewave(freq,wave,wh.dwBufferLength,shape);
 
-		if(waveOutWrite(waveOut, &wh, sizeof(wh))==MMSYSERR_NOERROR)
-			success=TRUE;
-
-		while(!(wh.dwFlags & WHDR_DONE))
-			SLEEP(1);
+		if(waveOutWrite(waveOut, &wh, sizeof(wh))==MMSYSERR_NOERROR) {
+			while(!(wh.dwFlags & WHDR_DONE))
+				SLEEP(1);
+		}
 	}
 #endif
 
-- 
GitLab