System: Fix very low underclocks locking up

This commit is contained in:
Connor McLaughlin 2022-09-17 14:26:37 +10:00
parent 436ed10f44
commit 05eecf9944

View file

@ -138,7 +138,8 @@ ALWAYS_INLINE_RELEASE TickCount ScaleTicksToOverclock(TickCount ticks)
if (!g_settings.cpu_overclock_active)
return ticks;
return static_cast<TickCount>((static_cast<u64>(static_cast<u32>(ticks)) * g_settings.cpu_overclock_numerator) /
return static_cast<TickCount>(((static_cast<u64>(static_cast<u32>(ticks)) * g_settings.cpu_overclock_numerator) +
(g_settings.cpu_overclock_denominator - 1)) /
g_settings.cpu_overclock_denominator);
}