mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Very rough approximation of UMD seek delays.
This commit is contained in:
@@ -146,7 +146,7 @@ void VirtualDiscFileSystem::LoadFileListIndex() {
|
||||
|
||||
void VirtualDiscFileSystem::DoState(PointerWrap &p)
|
||||
{
|
||||
auto s = p.Section("VirtualDiscFileSystem", 1);
|
||||
auto s = p.Section("VirtualDiscFileSystem", 1, 2);
|
||||
if (!s)
|
||||
return;
|
||||
|
||||
@@ -217,6 +217,12 @@ void VirtualDiscFileSystem::DoState(PointerWrap &p)
|
||||
}
|
||||
}
|
||||
|
||||
if (s >= 2) {
|
||||
p.Do(lastReadBlock_);
|
||||
} else {
|
||||
lastReadBlock_ = 0;
|
||||
}
|
||||
|
||||
// We don't savestate handlers (loaded on fs load), but if they change, it may not load properly.
|
||||
}
|
||||
|
||||
@@ -473,6 +479,12 @@ size_t VirtualDiscFileSystem::ReadFile(u32 handle, u8 *pointer, s64 size, int &u
|
||||
temp.Close();
|
||||
|
||||
iter->second.curOffset += size;
|
||||
// TODO: This probably isn't enough...
|
||||
if (abs((int)lastReadBlock_ - (int)iter->second.curOffset) > 100) {
|
||||
// This is an estimate, sometimes it takes 1+ seconds, but it definitely takes time.
|
||||
usec = 100000;
|
||||
}
|
||||
lastReadBlock_ = iter->second.curOffset;
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user