Changeset - r27663:934e08eed928
[Not reviewed]
master
0 2 0
Rubidium - 12 months ago 2023-06-28 20:20:19
rubidium@openttd.org
Codechange: use SignalObjectAndWait since we do not support older than Windows XP anymore
2 files changed with 3 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/sound/win32_s.cpp
Show inline comments
 
@@ -98,8 +98,7 @@ void SoundDriver_Win32::Stop()
 

	
 
	/* Stop the sound thread. */
 
	_waveout = nullptr;
 
	SetEvent(_event);
 
	WaitForSingleObject(_thread, INFINITE);
 
	SignalObjectAndWait(_event, _thread, INFINITE, FALSE);
 

	
 
	/* Close the sound device. */
 
	waveOutReset(waveout);
src/video/dedicated_v.cpp
Show inline comments
 
@@ -64,10 +64,8 @@ static void WINAPI CheckForConsoleInput(
 
		if (nb >= lengthof(_win_console_thread_buffer)) nb = lengthof(_win_console_thread_buffer) - 1;
 
		_win_console_thread_buffer[nb] = '\0';
 

	
 
		/* Signal input waiting that input is read and wait for it being handled
 
		 * SignalObjectAndWait() should be used here, but it's unsupported in Win98< */
 
		SetEvent(_hInputReady);
 
		WaitForSingleObject(_hWaitForInputHandling, INFINITE);
 
		/* Signal input waiting that input is read and wait for it being handled. */
 
		SignalObjectAndWait(_hInputReady, _hWaitForInputHandling, INFINITE, FALSE);
 
	}
 
}
 

	
0 comments (0 inline, 0 general)