summaryrefslogtreecommitdiff
path: root/src/sound
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2016-10-30 18:22:55 +0000
committermichi_cc <michi_cc@openttd.org>2016-10-30 18:22:55 +0000
commitc83306391e78d660b4c7b1bfef4008ccd5c7e172 (patch)
tree017d634c46d1344a498e441b811972601f162028 /src/sound
parentb2fe2c6e3d5570861fcca497da4c7dc8d94078cf (diff)
downloadopenttd-c83306391e78d660b4c7b1bfef4008ccd5c7e172.tar.xz
(svn r27673) -Add: [Win32] Thread names for windows debuggers.
Diffstat (limited to 'src/sound')
-rw-r--r--src/sound/win32_s.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sound/win32_s.cpp b/src/sound/win32_s.cpp
index 45f88172a..c9c1a8afd 100644
--- a/src/sound/win32_s.cpp
+++ b/src/sound/win32_s.cpp
@@ -19,6 +19,7 @@
#include "win32_s.h"
#include <windows.h>
#include <mmsystem.h>
+#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;