mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Replay: Skip recording virtual disc reads.
Oops.
This commit is contained in:
@@ -324,7 +324,7 @@ size_t DirectoryFileHandle::Read(u8* pointer, s64 size)
|
||||
// On a PSP. it actually is truncated, but the data wasn't erased.
|
||||
off_t off = (off_t)Seek(0, FILEMOVE_CURRENT);
|
||||
if (needsTrunc_ <= off) {
|
||||
return ReplayApplyDiskRead(pointer, 0, (uint32_t)size, CoreTiming::GetGlobalTimeUs());
|
||||
return replay_ ? ReplayApplyDiskRead(pointer, 0, (uint32_t)size, CoreTiming::GetGlobalTimeUs()) : 0;
|
||||
}
|
||||
if (needsTrunc_ < off + size) {
|
||||
size = needsTrunc_ - off;
|
||||
@@ -335,7 +335,7 @@ size_t DirectoryFileHandle::Read(u8* pointer, s64 size)
|
||||
#else
|
||||
bytesRead = read(hFile, pointer, size);
|
||||
#endif
|
||||
return ReplayApplyDiskRead(pointer, (uint32_t)bytesRead, (uint32_t)size, CoreTiming::GetGlobalTimeUs());
|
||||
return replay_ ? ReplayApplyDiskRead(pointer, (uint32_t)bytesRead, (uint32_t)size, CoreTiming::GetGlobalTimeUs()) : bytesRead;
|
||||
}
|
||||
|
||||
size_t DirectoryFileHandle::Write(const u8* pointer, s64 size)
|
||||
@@ -412,7 +412,7 @@ size_t DirectoryFileHandle::Seek(s32 position, FileMove type)
|
||||
result = lseek(hFile, position, moveMethod);
|
||||
#endif
|
||||
|
||||
return (size_t)ReplayApplyDisk64(ReplayAction::FILE_SEEK, result, CoreTiming::GetGlobalTimeUs());
|
||||
return replay_ ? (size_t)ReplayApplyDisk64(ReplayAction::FILE_SEEK, result, CoreTiming::GetGlobalTimeUs()) : result;
|
||||
}
|
||||
|
||||
void DirectoryFileHandle::Close()
|
||||
|
||||
Reference in New Issue
Block a user