mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-24 03:39:07 +02:00
Simulates memory stick size to get fixed free space.
Some games may be sensitive to the changes of free space of memory stick, and Android's free space is usually variable.
This commit is contained in:
1 parent
f0ea814107
commit
166035a87b
6 files changed
+28
-6
No files matched your search
@@ -669,3 +669,17 @@ void MetaFileSystem::DoState(PointerWrap &p)
|
||||
}
|
||||
}
|
||||
|
||||
u64 MetaFileSystem::getDirSize(const std::string &dirPath) {
|
||||
u64 result = 0;
|
||||
auto allFiles = GetDirListing(dirPath);
|
||||
for (auto file : allFiles) {
|
||||
if (file.name == "." || file.name == "..")
|
||||
continue;
|
||||
if (file.type == FILETYPE_DIRECTORY) {
|
||||
result += getDirSize(dirPath + file.name + "/");
|
||||
} else {
|
||||
result += file.size;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in new issue
Block a user