VSH: move cache to /cache/vsh/
This commit is contained in:
@@ -3756,7 +3756,11 @@ extern void ppu_finalize(const ppu_module& info, bool force_mem_release)
|
|||||||
// Get cache path for this executable
|
// Get cache path for this executable
|
||||||
std::string cache_path = fs::get_cache_dir() + "cache/";
|
std::string cache_path = fs::get_cache_dir() + "cache/";
|
||||||
|
|
||||||
if (!info.path.starts_with(dev_flash) && !Emu.GetTitleID().empty() && Emu.GetCat() != "1P")
|
if (Emu.IsVsh())
|
||||||
|
{
|
||||||
|
cache_path += "vsh/";
|
||||||
|
}
|
||||||
|
else if (!info.path.starts_with(dev_flash) && !Emu.GetTitleID().empty() && Emu.GetCat() != "1P")
|
||||||
{
|
{
|
||||||
cache_path += Emu.GetTitleID();
|
cache_path += Emu.GetTitleID();
|
||||||
cache_path += '/';
|
cache_path += '/';
|
||||||
@@ -4524,7 +4528,12 @@ bool ppu_initialize(const ppu_module& info, bool check_only, u64 file_size)
|
|||||||
|
|
||||||
const std::string dev_flash = vfs::get("/dev_flash/");
|
const std::string dev_flash = vfs::get("/dev_flash/");
|
||||||
|
|
||||||
if (!info.path.starts_with(dev_flash) && !Emu.GetTitleID().empty() && Emu.GetCat() != "1P")
|
if (Emu.IsVsh())
|
||||||
|
{
|
||||||
|
// Add prefix for vsh
|
||||||
|
cache_path += "vsh/";
|
||||||
|
}
|
||||||
|
else if (!info.path.starts_with(dev_flash) && !Emu.GetTitleID().empty() && Emu.GetCat() != "1P")
|
||||||
{
|
{
|
||||||
// Add prefix for anything except dev_flash files, standalone elfs or PS1 classics
|
// Add prefix for anything except dev_flash files, standalone elfs or PS1 classics
|
||||||
cache_path += Emu.GetTitleID();
|
cache_path += Emu.GetTitleID();
|
||||||
|
|||||||
+10
-3
@@ -3701,10 +3701,17 @@ void Emulator::ConfigurePPUCache(bool with_title_id) const
|
|||||||
|
|
||||||
_main.cache = rpcs3::utils::get_cache_dir();
|
_main.cache = rpcs3::utils::get_cache_dir();
|
||||||
|
|
||||||
if (with_title_id && !m_title_id.empty() && m_cat != "1P")
|
if (with_title_id)
|
||||||
{
|
{
|
||||||
_main.cache += GetTitleID();
|
if (IsVsh())
|
||||||
_main.cache += '/';
|
{
|
||||||
|
_main.cache += "vsh/";
|
||||||
|
}
|
||||||
|
else if (!m_title_id.empty() && m_cat != "1P")
|
||||||
|
{
|
||||||
|
_main.cache += GetTitleID();
|
||||||
|
_main.cache += '/';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt::append(_main.cache, "ppu-%s-%s/", fmt::base57(_main.sha1), _main.path.substr(_main.path.find_last_of('/') + 1));
|
fmt::append(_main.cache, "ppu-%s-%s/", fmt::base57(_main.sha1), _main.path.substr(_main.path.find_last_of('/') + 1));
|
||||||
|
|||||||
Reference in New Issue
Block a user