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.
This commit is contained in:
Christian Semmler
2026-06-20 17:15:35 -07:00
committed by Ryan C. Gordon
parent 49879ba0d6
commit e575093c83

View File

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