CDROM: Fix incorrect clamp with seek speedup

And bump the minimum time up around 0.29ms or so, hopefully improve
stability in FF7.
This commit is contained in:
Stenzek 2024-08-26 16:45:23 +10:00
parent 11c3b30140
commit 79f78448e2
No known key found for this signature in database

View file

@ -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<u32>(ticks / g_settings.cdrom_seek_speedup, MIN_TICKS);
ticks = std::max<u32>(ticks / g_settings.cdrom_seek_speedup, MIN_TICKS);
return System::ScaleTicksToOverclock(static_cast<TickCount>(ticks));
}