Replace GetTickCount with SDL_GetTicks

This commit is contained in:
Alexander Batalov 2022-05-28 09:32:36 +03:00
parent 31dbf77d6d
commit 6714aebbad
1 changed files with 4 additions and 8 deletions

View File

@ -540,8 +540,7 @@ void tickersExecute()
return; return;
} }
#pragma warning(suppress : 28159) gTickerLastTimestamp = SDL_GetTicks();
gTickerLastTimestamp = GetTickCount();
TickerListNode* curr = gTickerListHead; TickerListNode* curr = gTickerListHead;
TickerListNode** currPtr = &(gTickerListHead); TickerListNode** currPtr = &(gTickerListHead);
@ -839,8 +838,7 @@ void screenshotHandlerConfigure(int keyCode, ScreenshotHandler* handler)
// 0x4C9370 // 0x4C9370
unsigned int _get_time() unsigned int _get_time()
{ {
#pragma warning(suppress : 28159) return SDL_GetTicks();
return GetTickCount();
} }
// 0x4C937C // 0x4C937C
@ -865,8 +863,7 @@ void coreDelayProcessingEvents(unsigned int delay)
// 0x4C93B8 // 0x4C93B8
void coreDelay(unsigned int ms) void coreDelay(unsigned int ms)
{ {
#pragma warning(suppress : 28159) unsigned int start = SDL_GetTicks();
unsigned int start = GetTickCount();
unsigned int diff; unsigned int diff;
do { do {
// NOTE: Uninline // NOTE: Uninline
@ -877,8 +874,7 @@ void coreDelay(unsigned int ms)
// 0x4C93E0 // 0x4C93E0
unsigned int getTicksSince(unsigned int start) unsigned int getTicksSince(unsigned int start)
{ {
#pragma warning(suppress : 28159) unsigned int end = SDL_GetTicks();
unsigned int end = GetTickCount();
// NOTE: Uninline. // NOTE: Uninline.
return getTicksBetween(end, start); return getTicksBetween(end, start);