[DVD] Ignore buffer when seeking backwards

Unfortunately this fix re-breaks Arc Rise Fantasia, so we must restore its INI as well.
This commit is contained in:
Matt Mastracci 2016-02-25 08:08:22 -07:00
parent 2855fb39a4
commit f1a5d6c104
2 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
[Core]
# Values set here will override the main Dolphin settings.
FastDiscSpeed = True
[EmuState]
# The Emulation State. 1 is worst, 5 is best, 0 is not set.

View File

@ -1301,7 +1301,11 @@ u64 SimulateDiscReadTime(u64 offset, u32 length)
u64 disk_read_duration = CalculateRawDiscReadTime(offset, length) +
SystemTimers::GetTicksPerSecond() / 1000 * DISC_ACCESS_TIME_MS;
if (offset + length > s_last_read_offset + 1024 * 1024)
// Assume unbuffered read if the read we are performing asks for data >
// 1MB past the end of the last read *or* asks for data before the last
// read. It assumes the buffer is only used when reading small amounts
// forward.
if (offset + length > s_last_read_offset + 1024 * 1024 || offset < s_last_read_offset)
{
// No buffer; just use the simple seek time + read time.
DEBUG_LOG(DVDINTERFACE, "Seeking %" PRId64 " bytes",