1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-04-28 15:17:12 +02:00

Fix the 64bit build on windows by making sure the _WIN32_WINNT macro has the proper value to include GetTickCount64() and also default to regular GetTickCount() on 32bit as the 64bit placeholder.

This commit is contained in:
Sandu Liviu Catalin 2016-06-18 10:24:41 +03:00
parent 099c388b00
commit d1ae2fd7e8

View File

@ -10,6 +10,13 @@
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
#ifdef SQMOD_OS_WINDOWS #ifdef SQMOD_OS_WINDOWS
#if defined(_SQ64) && (_WIN32_WINNT < 0x0600)
// We need this for the GetTickCount64() function
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0600
#endif // _SQ64
#include <windows.h> #include <windows.h>
#else #else
#include <time.h> #include <time.h>
@ -83,7 +90,7 @@ Int64 Chrono::GetEpochTimeMicro()
#ifndef _SQ64 #ifndef _SQ64
Int64 GetTickCount64() Int64 GetTickCount64()
{ {
return 0ULL; // Should we fallback to 32 bit? return static_cast< Int64 >(GetTickCount()); // Fall-back to 32 bit?
} }
#endif // _SQ64 #endif // _SQ64