From 6714aebbadb8dad028b7153934c761acc6e581a1 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 28 May 2022 09:32:36 +0300 Subject: [PATCH] Replace GetTickCount with SDL_GetTicks --- src/core.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core.cc b/src/core.cc index 3d27d2e..983aa7c 100644 --- a/src/core.cc +++ b/src/core.cc @@ -540,8 +540,7 @@ void tickersExecute() return; } -#pragma warning(suppress : 28159) - gTickerLastTimestamp = GetTickCount(); + gTickerLastTimestamp = SDL_GetTicks(); TickerListNode* curr = gTickerListHead; TickerListNode** currPtr = &(gTickerListHead); @@ -839,8 +838,7 @@ void screenshotHandlerConfigure(int keyCode, ScreenshotHandler* handler) // 0x4C9370 unsigned int _get_time() { -#pragma warning(suppress : 28159) - return GetTickCount(); + return SDL_GetTicks(); } // 0x4C937C @@ -865,8 +863,7 @@ void coreDelayProcessingEvents(unsigned int delay) // 0x4C93B8 void coreDelay(unsigned int ms) { -#pragma warning(suppress : 28159) - unsigned int start = GetTickCount(); + unsigned int start = SDL_GetTicks(); unsigned int diff; do { // NOTE: Uninline @@ -877,8 +874,7 @@ void coreDelay(unsigned int ms) // 0x4C93E0 unsigned int getTicksSince(unsigned int start) { -#pragma warning(suppress : 28159) - unsigned int end = GetTickCount(); + unsigned int end = SDL_GetTicks(); // NOTE: Uninline. return getTicksBetween(end, start);