Skip to content

Commit

Permalink
CDROM: Fix incorrect clamp with seek speedup
Browse files Browse the repository at this point in the history
And bump the minimum time up around 0.29ms or so, hopefully improve
stability in FF7.
  • Loading branch information
stenzek committed Aug 26, 2024
1 parent 344a4a6 commit 46a6681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/cdrom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
}
Expand Down

0 comments on commit 46a6681

Please # to comment.