mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-25 00:04:49 +02:00
More elegant way of solving #5839 (d_private in sceIoDread)
We flag filesystems as being FAT32 instead of checking for "ms0:".
This commit is contained in:
@@ -255,6 +255,10 @@ std::string MetaFileSystem::NormalizePrefix(std::string prefix) const {
|
||||
if (startsWith(prefix, "host"))
|
||||
prefix = "host0:";
|
||||
|
||||
// Should we simply make this case insensitive?
|
||||
if (prefix == "DISC0:")
|
||||
prefix = "disc0:";
|
||||
|
||||
return prefix;
|
||||
}
|
||||
|
||||
@@ -284,6 +288,13 @@ void MetaFileSystem::Remount(IFileSystem *oldSystem, IFileSystem *newSystem) {
|
||||
}
|
||||
}
|
||||
|
||||
IFileSystem *MetaFileSystem::GetSystemFromFilename(const std::string &filename) {
|
||||
size_t prefixPos = filename.find(':');
|
||||
if (prefixPos == filename.npos)
|
||||
return 0;
|
||||
return GetSystem(filename.substr(0, prefixPos + 1));
|
||||
}
|
||||
|
||||
IFileSystem *MetaFileSystem::GetSystem(const std::string &prefix) {
|
||||
for (auto it = fileSystems.begin(); it != fileSystems.end(); ++it) {
|
||||
if (it->prefix == NormalizePrefix(prefix))
|
||||
|
||||
Reference in New Issue
Block a user