From f1a5d6c104e85a602a4e1a668dab517a55731ce4 Mon Sep 17 00:00:00 2001 From: Matt Mastracci Date: Thu, 25 Feb 2016 08:08:22 -0700 Subject: [PATCH] [DVD] Ignore buffer when seeking backwards Unfortunately this fix re-breaks Arc Rise Fantasia, so we must restore its INI as well. --- Data/Sys/GameSettings/RPJ.ini | 1 + Source/Core/Core/HW/DVDInterface.cpp | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Data/Sys/GameSettings/RPJ.ini b/Data/Sys/GameSettings/RPJ.ini index 483b2ab5af..8100204151 100644 --- a/Data/Sys/GameSettings/RPJ.ini +++ b/Data/Sys/GameSettings/RPJ.ini @@ -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. diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp index 27a4b5a9a7..b3001738c2 100644 --- a/Source/Core/Core/HW/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVDInterface.cpp @@ -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",