diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index fcb24ca25..8392249e2 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -401,20 +401,13 @@ TickCount GPU::CRTCTicksToSystemTicks(TickCount gpu_ticks, TickCount fractional_ TickCount GPU::SystemTicksToCRTCTicks(TickCount sysclk_ticks, TickCount* fractional_ticks) const { - if (!m_console_is_pal) - { - const u64 mul = u64(sysclk_ticks) * u64(715909) + u64(*fractional_ticks); - const TickCount ticks = static_cast(mul / u64(451584)); - *fractional_ticks = static_cast(mul % u64(451584)); - return ticks; - } - else - { - const u64 mul = u64(sysclk_ticks) * u64(709379) + u64(*fractional_ticks); - const TickCount ticks = static_cast(mul / u64(451584)); - *fractional_ticks = static_cast(mul % u64(451584)); - return ticks; - } + u64 mul = u64(sysclk_ticks); + mul *= !m_console_is_pal ? u64(715909) : u64(709379); + mul += u64(*fractional_ticks); + + const TickCount ticks = static_cast(mul / u64(451584)); + *fractional_ticks = static_cast(mul % u64(451584)); + return ticks; } void GPU::AddCommandTicks(TickCount ticks)