Fixed compiler warnings on iOS

This commit is contained in:
Sam Lantinga 2014-07-07 11:00:25 -07:00
parent 017c5dc381
commit 7187b74cf4
5 changed files with 10 additions and 12 deletions

View file

@ -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);
}