mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02:00
Add uncached flag for file loader reads.
This allows us to indicate that a read need not be cached.
This commit is contained in:
1 parent
cbb1ab17ca
commit
65c7d0bd04
15 files changed
+136
-117
No files matched your search
@@ -64,13 +64,13 @@ void RetryingFileLoader::Seek(s64 absolutePos) {
|
||||
filepos_ = absolutePos;
|
||||
}
|
||||
|
||||
size_t RetryingFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data) {
|
||||
size_t readSize = backend_->ReadAt(absolutePos, bytes, data);
|
||||
size_t RetryingFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data, Flags flags) {
|
||||
size_t readSize = backend_->ReadAt(absolutePos, bytes, data, flags);
|
||||
|
||||
int retries = 0;
|
||||
while (readSize < bytes && retries < MAX_RETRIES) {
|
||||
u8 *p = (u8 *)data;
|
||||
readSize += backend_->ReadAt(absolutePos + readSize, bytes - readSize, p + readSize);
|
||||
readSize += backend_->ReadAt(absolutePos + readSize, bytes - readSize, p + readSize, flags);
|
||||
++retries;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user