From: Ryan Houdek Sonicadvance1@gmail.com
Otherwise the `~MHz` registry key is initialized to the maximum clock speed of the CPUs, which is known to break games. --- programs/wineboot/wineboot.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 02d192a1982..8359e5d4c44 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -297,6 +297,15 @@ static UINT64 read_tsc_frequency(void) return freq; }
+#elif defined(__aarch64__) + +static UINT64 read_tsc_frequency(void) +{ + UINT64 tsc_frequency; + __asm__ volatile( "mrs %[Res], CNTFRQ_EL0" : [Res] "=r" (tsc_frequency) ); + return tsc_frequency; +} + #else
static UINT64 read_tsc_frequency(void)