Virtualize cellSysCache

Allows caches from multiple games to coexist.
Also change the way of handling cache IDs (file-less).
This commit is contained in:
Nekotekina 2019-11-05 18:09:03 +03:00
parent 508ffcb775
commit 03b9ee27c5
10 changed files with 170 additions and 109 deletions

View file

@ -239,7 +239,7 @@ std::string vfs::get(std::string_view vpath, std::vector<std::string>* out_dir)
return std::string{result_base} + vfs::escape(fmt::merge(result, "/"));
}
std::string vfs::escape(std::string_view path)
std::string vfs::escape(std::string_view path, bool escape_slash)
{
std::string result;
result.reserve(path.size());
@ -331,6 +331,17 @@ std::string vfs::escape(std::string_view path)
result += u8"";
break;
}
case '/':
{
if (escape_slash)
{
result += u8"";
break;
}
result += c;
break;
}
case char{u8""[0]}:
{
// Escape full-width characters 0xFF01..0xFF5e with (0xFF01)