diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp --- a/src/sound/win32_s.cpp +++ b/src/sound/win32_s.cpp @@ -19,6 +19,7 @@ #include "win32_s.h" #include #include +#include "../os/windows/win32.h" #include "../safeguards.h" @@ -41,6 +42,8 @@ static void PrepareHeader(WAVEHDR *hdr) static DWORD WINAPI SoundThread(LPVOID arg) { + SetWin32ThreadName(-1, "ottd:win-sound"); + do { for (WAVEHDR *hdr = _wave_hdr; hdr != endof(_wave_hdr); hdr++) { if ((hdr->dwFlags & WHDR_INQUEUE) != 0) continue;