mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Add a consistent feature check - only desktops get to use CacheFullISOInRAM.
This commit is contained in:
1 parent
8d9b3f28f2
commit
b05d6171d4
6 files changed
+30
-11
No files matched your search
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
#include "Common/Log.h"
|
||||
#include "Core/FileLoaders/RamCachingFileLoader.h"
|
||||
|
||||
// Takes ownership of backend.
|
||||
@@ -91,6 +92,7 @@ void RamCachingFileLoader::InitCache() {
|
||||
// Overallocate for the last block.
|
||||
cache_ = (u8 *)malloc((size_t)blockCount << BLOCK_SHIFT);
|
||||
if (cache_ == nullptr) {
|
||||
ERROR_LOG(Log::IO, "Failed to allocate cache for Cache full ISO in RAM! Will fall back to regular reads.");
|
||||
return;
|
||||
}
|
||||
aheadRemaining_ = blockCount;
|
||||
@@ -178,6 +180,8 @@ void RamCachingFileLoader::SaveIntoCache(s64 pos, size_t bytes, Flags flags) {
|
||||
if (blocksToRead >= MAX_BLOCKS_PER_READ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO: Shouldn't we break as soon as we see a 1?
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user