Fix Apple performance frequency to match nanosecond counter
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled

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
}