mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Loaders: Depriorize disc streaming queue items.
We want the local items, if any, to load first. This gives us icons, etc.
This commit is contained in:
parent
2943bbdbfd
commit
8b665ae696
@ -289,6 +289,10 @@ void CachingFileLoader::StartReadAhead(s64 pos) {
|
||||
th.detach();
|
||||
}
|
||||
|
||||
bool CachingFileLoader::IsRemote() {
|
||||
return backend_->IsRemote();
|
||||
}
|
||||
|
||||
void CachingFileLoader::Cancel() {
|
||||
backend_->Cancel();
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
CachingFileLoader(FileLoader *backend);
|
||||
~CachingFileLoader() override;
|
||||
|
||||
bool IsRemote() override;
|
||||
bool Exists() override;
|
||||
bool ExistsFast() override;
|
||||
bool IsDirectory() override;
|
||||
|
@ -115,6 +115,10 @@ size_t DiskCachingFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data,
|
||||
return readSize;
|
||||
}
|
||||
|
||||
bool DiskCachingFileLoader::IsRemote() {
|
||||
return backend_->IsRemote();
|
||||
}
|
||||
|
||||
void DiskCachingFileLoader::Cancel() {
|
||||
backend_->Cancel();
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ public:
|
||||
DiskCachingFileLoader(FileLoader *backend);
|
||||
~DiskCachingFileLoader() override;
|
||||
|
||||
bool IsRemote() override;
|
||||
bool Exists() override;
|
||||
bool ExistsFast() override;
|
||||
bool IsDirectory() override;
|
||||
|
@ -30,6 +30,9 @@ public:
|
||||
HTTPFileLoader(const std::string &filename);
|
||||
virtual ~HTTPFileLoader() override;
|
||||
|
||||
bool IsRemote() override {
|
||||
return true;
|
||||
}
|
||||
virtual bool Exists() override;
|
||||
virtual bool ExistsFast() override;
|
||||
virtual bool IsDirectory() override;
|
||||
|
@ -270,3 +270,7 @@ u32 RamCachingFileLoader::NextAheadBlock() {
|
||||
|
||||
return 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
bool RamCachingFileLoader::IsRemote() {
|
||||
return backend_->IsRemote();
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
RamCachingFileLoader(FileLoader *backend);
|
||||
~RamCachingFileLoader() override;
|
||||
|
||||
bool IsRemote() override;
|
||||
bool Exists() override;
|
||||
bool ExistsFast() override;
|
||||
bool IsDirectory() override;
|
||||
|
@ -73,6 +73,10 @@ size_t RetryingFileLoader::ReadAt(s64 absolutePos, size_t bytes, void *data, Fla
|
||||
return readSize;
|
||||
}
|
||||
|
||||
bool RetryingFileLoader::IsRemote() {
|
||||
return backend_->IsRemote();
|
||||
}
|
||||
|
||||
void RetryingFileLoader::Cancel() {
|
||||
backend_->Cancel();
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ public:
|
||||
RetryingFileLoader(FileLoader *backend);
|
||||
~RetryingFileLoader() override;
|
||||
|
||||
bool IsRemote() override;
|
||||
bool Exists() override;
|
||||
bool ExistsFast() override;
|
||||
bool IsDirectory() override;
|
||||
|
@ -66,6 +66,9 @@ public:
|
||||
|
||||
virtual ~FileLoader() {}
|
||||
|
||||
virtual bool IsRemote() {
|
||||
return false;
|
||||
}
|
||||
virtual bool Exists() = 0;
|
||||
virtual bool ExistsFast() {
|
||||
return Exists();
|
||||
|
@ -650,6 +650,11 @@ handleELF:
|
||||
}
|
||||
|
||||
float priority() override {
|
||||
auto fl = info_->GetFileLoader();
|
||||
if (fl && fl->IsRemote()) {
|
||||
// Increase the value so remote info loads after non-remote.
|
||||
return info_->lastAccessedTime + 1000.0f;
|
||||
}
|
||||
return info_->lastAccessedTime;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user