diff --git a/include/SDL3/SDL_timer.h b/include/SDL3/SDL_timer.h index 3a1c2ebf0..99c4795c8 100644 --- a/include/SDL3/SDL_timer.h +++ b/include/SDL3/SDL_timer.h @@ -42,7 +42,7 @@ extern "C" { */ #define SDL_MS_PER_SECOND 1000 #define SDL_US_PER_SECOND 1000000 -#define SDL_NS_PER_SECOND 1000000000LLU +#define SDL_NS_PER_SECOND 1000000000LL #define SDL_NS_PER_MS 1000000 #define SDL_NS_PER_US 1000 #define SDL_MS_TO_NS(MS) (((Uint64)(MS)) * SDL_NS_PER_MS) diff --git a/src/atomic/SDL_atomic.c b/src/atomic/SDL_atomic.c index bb21d8478..78e249ca3 100644 --- a/src/atomic/SDL_atomic.c +++ b/src/atomic/SDL_atomic.c @@ -20,7 +20,7 @@ */ #include "SDL_internal.h" -#if defined(_MSC_VER) && (_MSC_VER >= 1500) +#if defined(_MSC_VER) && (_MSC_VER >= 1900) #include #define HAVE_MSC_ATOMICS 1 #endif diff --git a/src/timer/ngage/SDL_systimer.cpp b/src/timer/ngage/SDL_systimer.cpp index 5112d8ecd..523278248 100644 --- a/src/timer/ngage/SDL_systimer.cpp +++ b/src/timer/ngage/SDL_systimer.cpp @@ -47,7 +47,7 @@ SDL_GetPerformanceFrequency(void) void SDL_DelayNS(Uint64 ns) { - const Uint64 max_delay = 0x7fffffffLLU * SDL_NS_PER_US; + const Uint64 max_delay = 0x7fffffffLL * SDL_NS_PER_US; if (ns > max_delay) { ns = max_delay; } diff --git a/src/timer/psp/SDL_systimer.c b/src/timer/psp/SDL_systimer.c index bc26bcea4..9db1efea7 100644 --- a/src/timer/psp/SDL_systimer.c +++ b/src/timer/psp/SDL_systimer.c @@ -50,7 +50,7 @@ SDL_GetPerformanceFrequency(void) void SDL_DelayNS(Uint64 ns) { - const Uint64 max_delay = 0xffffffffLLU * SDL_NS_PER_US; + const Uint64 max_delay = 0xffffffffLL * SDL_NS_PER_US; if (ns > max_delay) { ns = max_delay; } diff --git a/src/timer/vita/SDL_systimer.c b/src/timer/vita/SDL_systimer.c index 9cdc45366..87248fe30 100644 --- a/src/timer/vita/SDL_systimer.c +++ b/src/timer/vita/SDL_systimer.c @@ -43,7 +43,7 @@ SDL_GetPerformanceFrequency(void) void SDL_DelayNS(Uint64 ns) { - const Uint64 max_delay = 0xffffffffLLU * SDL_NS_PER_US; + const Uint64 max_delay = 0xffffffffLL * SDL_NS_PER_US; if (ns > max_delay) { ns = max_delay; } diff --git a/src/timer/windows/SDL_systimer.c b/src/timer/windows/SDL_systimer.c index 8fd509980..7cdf2a4ab 100644 --- a/src/timer/windows/SDL_systimer.c +++ b/src/timer/windows/SDL_systimer.c @@ -73,7 +73,7 @@ void SDL_DelayNS(Uint64 ns) #endif { - const Uint64 max_delay = 0xffffffffLLU * SDL_NS_PER_MS; + const Uint64 max_delay = 0xffffffffLL * SDL_NS_PER_MS; if (ns > max_delay) { ns = max_delay; } diff --git a/src/video/windows/SDL_windowsevents.c b/src/video/windows/SDL_windowsevents.c index 60fc9611c..20337e90d 100644 --- a/src/video/windows/SDL_windowsevents.c +++ b/src/video/windows/SDL_windowsevents.c @@ -121,7 +121,7 @@ static void WIN_SetMessageTick(DWORD tick) if (message_tick) { if (tick < message_tick && timestamp_offset) { /* The tick counter rolled over, bump our offset */ - timestamp_offset += SDL_MS_TO_NS(0x100000000LLU); + timestamp_offset += SDL_MS_TO_NS(0x100000000LL); } } message_tick = tick;