update parallel rdp

This commit is contained in:
Logan McNaughton committed 2024-05-29 07:08:56 -06:00
1 parent f5e21b0b44
commit 123969cfab
2 files changed
+7 -5

No files matched your search

+6 -4
View File
@@ -22,7 +22,7 @@
#include "thread_name.hpp"
#ifdef __linux__
#if !defined(_WIN32)
#include <pthread.h>
#else
#define WIN32_LEAN_AND_MEAN
@@ -34,9 +34,11 @@ namespace Util
{
void set_current_thread_name(const char *name)
{
#ifdef __linux__
#if defined(__linux__)
pthread_setname_np(pthread_self(), name);
#else
#elif defined(__APPLE__)
pthread_setname_np(name);
#elif defined(_WIN32)
using PFN_SetThreadDescription = HRESULT (WINAPI *)(HANDLE, PCWSTR);
auto module = GetModuleHandleA("kernel32.dll");
PFN_SetThreadDescription SetThreadDescription = module ? reinterpret_cast<PFN_SetThreadDescription>(
@@ -54,4 +56,4 @@ void set_current_thread_name(const char *name)
}
#endif
}
}
}