PRX/savestates/VSH: Associate PRX with library, fix VSH browser (#13221)

* PRX/savestate:s Associate PRX with library

* VFS/Savestates: Fix host_root resolving

* Savestates: Fix segfault in ppu_initialize

* SPU: Avoid some log spam

* VSH/sys_vm: Fix limit on root processes
This commit is contained in:
Elad Ashkenazi 2023-01-15 22:12:54 +02:00 committed by GitHub
parent 1852b370d7
commit e6a7597444
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 92 additions and 37 deletions

View file

@ -75,6 +75,10 @@ bool vfs::mount(std::string_view vpath, std::string_view path, bool is_dir)
list.back()->path += '/';
if (!is_dir && list.back()->path.ends_with('/'))
vfs_log.error("File mounted with trailing /.");
if (path == "/") // Special
list.back()->path = "/";
vfs_log.notice("Mounted path \"%s\" to \"%s\"", vpath_backup, list.back()->path);
return true;
}
@ -376,21 +380,19 @@ std::string vfs::retrieve(std::string_view path, const vfs_directory* node, std:
std::vector<std::string_view> mount_path_empty;
if (std::string res = vfs::retrieve(path, &table.root, &mount_path_empty); !res.empty())
const std::string rpath = Emu.GetCallbacks().resolve_path(path);
if (!rpath.empty())
{
return res;
if (std::string res = vfs::retrieve(rpath, &table.root, &mount_path_empty); !res.empty())
{
return res;
}
}
mount_path_empty.clear();
const std::string rpath = Emu.GetCallbacks().resolve_path(path);
if (rpath.empty())
{
return {};
}
return vfs::retrieve(rpath, &table.root, &mount_path_empty);
return vfs::retrieve(path, &table.root, &mount_path_empty);
}
mount_path->emplace_back();