diff --git a/src/xpdev/genwrap.c b/src/xpdev/genwrap.c index 30f6a3f70ad71f29825b2616594427c506e71221..c77c5c9f7b4eb4d63dcd6ffa736b1ae8416b86c0 100644 --- a/src/xpdev/genwrap.c +++ b/src/xpdev/genwrap.c @@ -39,6 +39,11 @@ #elif defined(_WIN32) #include <windows.h> #include <lm.h> /* NetWkstaGetInfo() */ + #if WINVER >= 0x0600 // _WIN32_WINNT_VISTA + #define GetTickCount() GetTickCount64() + #endif +#else + #endif #include "genwrap.h" /* Verify prototypes */ @@ -1052,7 +1057,7 @@ long double xp_timer(void) #endif } else { - ret = GetTickCount(); + ret = (long double)GetTickCount(); ret /= 1000; } #else @@ -1160,11 +1165,7 @@ int64_t xp_fast_timer64(void) else ret = -1; #elif defined(_WIN32) -#if WINVER < 0x0600 ret = GetTickCount() / 1000; -#else - ret = GetTickCount64() / 1000; -#endif #else #error no high-resolution time for this platform #endif