From e575093c83002b22ff31bf781da69ef937df1fd8 Mon Sep 17 00:00:00 2001
From: Christian Semmler <[EMAIL REDACTED]>
Date: Sat, 20 Jun 2026 17:15:35 -0700
Subject: [PATCH] Fix Apple performance frequency to match nanosecond counter
The counter returns ns via clock_gettime_nsec_np, so the frequency must be SDL_NS_PER_SECOND.
---
src/timer/unix/SDL_systimer.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/timer/unix/SDL_systimer.c b/src/timer/unix/SDL_systimer.c
index 9a72d43685a9e..eee14f1508ef0 100644
--- a/src/timer/unix/SDL_systimer.c
+++ b/src/timer/unix/SDL_systimer.c
@@ -128,10 +128,7 @@ Uint64 SDL_GetPerformanceFrequency(void)
#ifdef HAVE_CLOCK_GETTIME
return SDL_NS_PER_SECOND;
#elif defined(SDL_PLATFORM_APPLE)
- Uint64 freq = mach_base_info.denom;
- freq *= SDL_NS_PER_SECOND;
- freq /= mach_base_info.numer;
- return freq;
+ return SDL_NS_PER_SECOND;
#endif
}