mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 05:57:44 +00:00
Fixed compiler warnings on iOS
This commit is contained in:
@@ -106,7 +106,7 @@ SDL_GetTicks(void)
|
||||
start_ts.tv_nsec) / 1000000;
|
||||
#elif defined(__APPLE__)
|
||||
uint64_t now = mach_absolute_time();
|
||||
ticks = (((now - start_mach) * mach_base_info.numer) / mach_base_info.denom) / 1000000;
|
||||
ticks = (Uint32)((((now - start_mach) * mach_base_info.numer) / mach_base_info.denom) / 1000000);
|
||||
#else
|
||||
SDL_assert(SDL_FALSE);
|
||||
ticks = 0;
|
||||
@@ -115,9 +115,7 @@ SDL_GetTicks(void)
|
||||
struct timeval now;
|
||||
|
||||
gettimeofday(&now, NULL);
|
||||
ticks =
|
||||
(now.tv_sec - start_tv.tv_sec) * 1000 + (now.tv_usec -
|
||||
start_tv.tv_usec) / 1000;
|
||||
ticks = (Uint32)((now.tv_sec - start_tv.tv_sec) * 1000 + (now.tv_usec - start_tv.tv_usec) / 1000);
|
||||
}
|
||||
return (ticks);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user