Fix compilation on Windows < Vista

This commit is contained in:
SirLynix
2023-12-28 13:25:33 +01:00
parent 4039d16df0
commit 3d21401569
5 changed files with 44 additions and 10 deletions

View File

@@ -118,8 +118,14 @@ namespace Nz::PlatformImpl
static SetThreadDescriptionFunc SetThreadDescription = reinterpret_cast<SetThreadDescriptionFunc>(::GetProcAddress(::GetModuleHandleW(L"Kernel32.dll"), "SetThreadDescription"));
if (SetThreadDescription)
SetThreadDescription(threadHandle, ToWideString(threadName).data());
#if NAZARA_UTILS_WINDOWS_NT6
else
RaiseThreadNameException(::GetThreadId(threadHandle), threadName);
#else
NazaraUnused(threadHandle);
NazaraUnused(threadName);
#endif
#else
::pthread_setname_np(threadHandle, threadName);
#endif

View File

@@ -51,11 +51,11 @@ namespace Nz
Time GetElapsedMillisecondsImpl()
{
#ifdef NAZARA_UTILS_WINDOWS_NT6
#if NAZARA_UTILS_WINDOWS_NT6
return Time::Milliseconds(GetTickCount64());
#else
#else
return Time::Milliseconds(GetTickCount());
#endif
#endif
}
}