mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
Use Uint64 instead for tick_numerators in USE_128BIT_MATH
(cherry picked from commit 230814e85e)
This commit is contained in:
parent
36ba09b63d
commit
2fad85fa26
1 changed files with 4 additions and 4 deletions
|
|
@ -541,8 +541,8 @@ typedef unsigned __int128 Uint128;
|
|||
|
||||
static Uint64 tick_start;
|
||||
#ifdef USE_128BIT_MATH
|
||||
static Uint128 tick_numerator_ns;
|
||||
static Uint128 tick_numerator_ms;
|
||||
static Uint64 tick_numerator_ns;
|
||||
static Uint64 tick_numerator_ms;
|
||||
#else
|
||||
static Uint32 tick_numerator_ns;
|
||||
static Uint32 tick_denominator_ns;
|
||||
|
|
@ -609,8 +609,8 @@ void SDL_InitTicks(void)
|
|||
SDL_assert(tick_freq > 0 && tick_freq <= (Uint64)SDL_MAX_UINT32);
|
||||
|
||||
#ifdef USE_128BIT_MATH
|
||||
tick_numerator_ns = ((Uint128)SDL_NS_PER_SECOND << 32) / tick_freq;
|
||||
tick_numerator_ms = ((Uint128)SDL_MS_PER_SECOND << 32) / tick_freq;
|
||||
tick_numerator_ns = ((Uint64)SDL_NS_PER_SECOND << 32) / tick_freq;
|
||||
tick_numerator_ms = ((Uint64)SDL_MS_PER_SECOND << 32) / tick_freq;
|
||||
#else
|
||||
gcd = SDL_CalculateGCD(SDL_NS_PER_SECOND, (Uint32)tick_freq);
|
||||
tick_numerator_ns = (SDL_NS_PER_SECOND / gcd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue