From 142f34accc034245e261df06837c00dd9cfbf941 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sat, 9 Mar 2019 00:11:10 +0100 Subject: [PATCH] Use SDL for tracking time This should also allow the game to run for 49 dayes from game start instead of 49 dayes from system boot. --- SourceX/miniwin.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SourceX/miniwin.cpp b/SourceX/miniwin.cpp index 02cc579e3..5a00dc5de 100644 --- a/SourceX/miniwin.cpp +++ b/SourceX/miniwin.cpp @@ -58,10 +58,7 @@ char *__cdecl _itoa(int _Value, char *_Dest, int _Radix) DWORD WINAPI GetTickCount(VOID) { - struct timespec now; - if (clock_gettime(CLOCK_MONOTONIC, &now)) - return 0; - return now.tv_sec * 1000.0 + now.tv_nsec / 1000000.0; + return SDL_GetTicks(); } VOID WINAPI Sleep(DWORD dwMilliseconds)