Codechange: use SignalObjectAndWait since we do not support older than Windows XP anymore
This commit is contained in:
@@ -98,8 +98,7 @@ void SoundDriver_Win32::Stop()
|
|||||||
|
|
||||||
/* Stop the sound thread. */
|
/* Stop the sound thread. */
|
||||||
_waveout = nullptr;
|
_waveout = nullptr;
|
||||||
SetEvent(_event);
|
SignalObjectAndWait(_event, _thread, INFINITE, FALSE);
|
||||||
WaitForSingleObject(_thread, INFINITE);
|
|
||||||
|
|
||||||
/* Close the sound device. */
|
/* Close the sound device. */
|
||||||
waveOutReset(waveout);
|
waveOutReset(waveout);
|
||||||
|
@@ -64,10 +64,8 @@ static void WINAPI CheckForConsoleInput()
|
|||||||
if (nb >= lengthof(_win_console_thread_buffer)) nb = lengthof(_win_console_thread_buffer) - 1;
|
if (nb >= lengthof(_win_console_thread_buffer)) nb = lengthof(_win_console_thread_buffer) - 1;
|
||||||
_win_console_thread_buffer[nb] = '\0';
|
_win_console_thread_buffer[nb] = '\0';
|
||||||
|
|
||||||
/* Signal input waiting that input is read and wait for it being handled
|
/* Signal input waiting that input is read and wait for it being handled. */
|
||||||
* SignalObjectAndWait() should be used here, but it's unsupported in Win98< */
|
SignalObjectAndWait(_hInputReady, _hWaitForInputHandling, INFINITE, FALSE);
|
||||||
SetEvent(_hInputReady);
|
|
||||||
WaitForSingleObject(_hWaitForInputHandling, INFINITE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user