Skip to content

Commit e32fc91

Browse files
committed
Hardcode frequency on Apple Silicon
On Apple Silicon, PPCTimer estimates a terribily inaccurate RSTSC frequency and results in games (specifically tested Color Splash & MK8) run extremely fast especially in the title screens which unsurpisingly doesn't work that well. The value hardcoded is the same frequency as on Rosetta. Admittedly this probably isn't the best solution however it is accurate and it works.
1 parent 7fdf7cf commit e32fc91

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/highresolutiontimer/HighResolutionTimer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ uint64 HighResolutionTimer::m_freq = []() -> uint64 {
2727
LARGE_INTEGER freq;
2828
QueryPerformanceFrequency(&freq);
2929
return (uint64)(freq.QuadPart);
30+
#elif BOOST_OS_MACOS && defined(__arm64__)
31+
return 1000000000;
3032
#else
3133
timespec pc;
3234
clock_getres(CLOCK_MONOTONIC_RAW, &pc);

0 commit comments

Comments
 (0)