From 46a668115957bf5ffde5a192bef3bb6e270037ff Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 26 Aug 2024 16:45:23 +1000 Subject: [PATCH] CDROM: Fix incorrect clamp with seek speedup And bump the minimum time up around 0.29ms or so, hopefully improve stability in FF7. --- src/core/cdrom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/cdrom.cpp b/src/core/cdrom.cpp index f5cf9993f..3ae08dd0c 100644 --- a/src/core/cdrom.cpp +++ b/src/core/cdrom.cpp @@ -1441,7 +1441,7 @@ TickCount CDROM::GetTicksForRead() TickCount CDROM::GetTicksForSeek(CDImage::LBA new_lba, bool ignore_speed_change) { - static constexpr TickCount MIN_TICKS = 20000; + static constexpr TickCount MIN_TICKS = 30000; if (g_settings.cdrom_seek_speedup == 0) return MIN_TICKS; @@ -1520,7 +1520,7 @@ TickCount CDROM::GetTicksForSeek(CDImage::LBA new_lba, bool ignore_speed_change) } if (g_settings.cdrom_seek_speedup > 1) - ticks = std::min(ticks / g_settings.cdrom_seek_speedup, MIN_TICKS); + ticks = std::max(ticks / g_settings.cdrom_seek_speedup, MIN_TICKS); return System::ScaleTicksToOverclock(static_cast(ticks)); }