Fix recent GetThreadDescription change

This commit is contained in:
Jérôme Leclercq 2023-07-21 09:20:46 +02:00 committed by GitHub
parent c25113fea9
commit 9e7b98a017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,8 @@ namespace Nz::PlatformImpl
std::string GetThreadName(ThreadHandle threadHandle)
{
NAZARA_USE_ANONYMOUS_NAMESPACE
#ifndef NAZARA_COMPILER_MINGW
// Use GetThreadDescription if available
PWSTR namePtr;
@ -53,7 +55,7 @@ namespace Nz::PlatformImpl
if (!GetThreadDescription)
return "<GetThreadDescription not supported>";
HRESULT hr = ::GetThreadDescription(threadHandle, &namePtr);
HRESULT hr = GetThreadDescription(threadHandle, &namePtr);
if (FAILED(hr))
return "<GetThreadDescription failed: " + std::to_string(HRESULT_CODE(hr)) + ">";