From 1b7bcb84a1a218c9035d41c7a17b7a11e74eca6f Mon Sep 17 00:00:00 2001 From: lizzie Date: Sat, 18 Oct 2025 08:01:50 +0000 Subject: [PATCH] [compat] Windows 8.1 support Signed-off-by: lizzie --- src/common/thread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 832232cd15..3aad74e7f8 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -81,7 +81,10 @@ void SetCurrentThreadPriority(ThreadPriority new_priority) { // Sets the debugger-visible name of the current thread. void SetCurrentThreadName(const char* name) { - SetThreadDescription(GetCurrentThread(), UTF8ToUTF16W(name).data()); + if (auto pf = (decltype(&SetThreadDescription))GetProcAddress(GetModuleHandle(TEXT("KernelBase.dll")), "SetThreadDescription"); pf) + pf(GetCurrentThread(), UTF8ToUTF16W(name).data()); // Windows 10+ + else + ; // No-op } #else // !MSVC_VER, so must be POSIX threads