Merge pull request #3673 from mmastrac/dvd_nobackwardsbuffer

[DVD] Ignore buffer when seeking backwards
This commit is contained in:
Pierre Bourdon 2016-02-26 13:14:47 +01:00
commit 1b37b39d64
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",