Fix recent GetThreadDescription change
This commit is contained in:
parent
c25113fea9
commit
9e7b98a017
|
|
@ -46,6 +46,8 @@ namespace Nz::PlatformImpl
|
||||||
|
|
||||||
std::string GetThreadName(ThreadHandle threadHandle)
|
std::string GetThreadName(ThreadHandle threadHandle)
|
||||||
{
|
{
|
||||||
|
NAZARA_USE_ANONYMOUS_NAMESPACE
|
||||||
|
|
||||||
#ifndef NAZARA_COMPILER_MINGW
|
#ifndef NAZARA_COMPILER_MINGW
|
||||||
// Use GetThreadDescription if available
|
// Use GetThreadDescription if available
|
||||||
PWSTR namePtr;
|
PWSTR namePtr;
|
||||||
|
|
@ -53,7 +55,7 @@ namespace Nz::PlatformImpl
|
||||||
if (!GetThreadDescription)
|
if (!GetThreadDescription)
|
||||||
return "<GetThreadDescription not supported>";
|
return "<GetThreadDescription not supported>";
|
||||||
|
|
||||||
HRESULT hr = ::GetThreadDescription(threadHandle, &namePtr);
|
HRESULT hr = GetThreadDescription(threadHandle, &namePtr);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return "<GetThreadDescription failed: " + std::to_string(HRESULT_CODE(hr)) + ">";
|
return "<GetThreadDescription failed: " + std::to_string(HRESULT_CODE(hr)) + ">";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue