From c83306391e78d660b4c7b1bfef4008ccd5c7e172 Mon Sep 17 00:00:00 2001 From: michi_cc Date: Sun, 30 Oct 2016 18:22:55 +0000 Subject: (svn r27673) -Add: [Win32] Thread names for windows debuggers. --- src/video/dedicated_v.cpp | 3 +++ src/video/win32_v.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/video') diff --git a/src/video/dedicated_v.cpp b/src/video/dedicated_v.cpp index e038df975..5e2be481c 100644 --- a/src/video/dedicated_v.cpp +++ b/src/video/dedicated_v.cpp @@ -84,6 +84,7 @@ static void DedicatedSignalHandler(int sig) # endif # include # include +# include "../os/windows/win32.h" static HANDLE _hInputReady, _hWaitForInputHandling; static HANDLE _hThread; // Thread to close static char _win_console_thread_buffer[200]; @@ -95,6 +96,8 @@ static void WINAPI CheckForConsoleInput() /* WinCE doesn't support console stuff */ return; #else + SetWin32ThreadName(-1, "ottd:win-console"); + DWORD nb; HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE); for (;;) { diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 4dcc9eb70..c37ebd7dd 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -1199,7 +1199,7 @@ void VideoDriver_Win32::MainLoop() _draw_threaded = false; } else { _draw_continue = true; - _draw_threaded = ThreadObject::New(&PaintWindowThread, NULL, &_draw_thread); + _draw_threaded = ThreadObject::New(&PaintWindowThread, NULL, &_draw_thread, "ottd:draw-win32"); /* Free the mutex if we won't be able to use it. */ if (!_draw_threaded) { -- cgit v1.2.3-70-g09d2