Fix SetThreadName on apple

This commit is contained in:
2021-01-28 02:53:11 +01:00
parent 917ee28ac2
commit 29f158c9b2

View File

@@ -22,6 +22,8 @@ namespace openVulkanoCpp
auto thisThread = ::GetCurrentThread(); auto thisThread = ::GetCurrentThread();
std::wstring namew(name.begin(), name.end()); std::wstring namew(name.begin(), name.end());
SetThreadDescription(thisThread, namew.c_str()); SetThreadDescription(thisThread, namew.c_str());
#elif __APPLE__
pthread_setname_np(name.c_str());
#else #else
pthread_setname_np(pthread_self(), name.c_str()); pthread_setname_np(pthread_self(), name.c_str());
#endif #endif