diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index ff507f6c48..cdd2933d98 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -3756,11 +3756,13 @@ extern void ppu_finalize(const ppu_module& info, bool force_mem_release) // Get cache path for this executable std::string cache_path = fs::get_cache_dir() + "cache/"; - if (Emu.IsVsh()) + const bool in_dev_flash = info.path.starts_with(dev_flash); + + if (in_dev_flash && !info.path.starts_with(dev_flash + "sys/external/")) { cache_path += "vsh/"; } - else if (!info.path.starts_with(dev_flash) && !Emu.GetTitleID().empty() && Emu.GetCat() != "1P") + else if (!in_dev_flash && !Emu.GetTitleID().empty() && Emu.GetCat() != "1P") { cache_path += Emu.GetTitleID(); cache_path += '/'; @@ -4264,7 +4266,7 @@ extern void ppu_precompile(std::vector& dir_queue, std::vectorget(); _main.cache = rpcs3::utils::get_cache_dir(); - if (with_title_id) + const std::string dev_flash = vfs::get("/dev_flash/"); + const bool in_dev_flash = _main.path.starts_with(dev_flash); + + if (in_dev_flash && !_main.path.starts_with(dev_flash + "sys/external/")) { - if (IsVsh()) - { - _main.cache += "vsh/"; - } - else if (!m_title_id.empty() && m_cat != "1P") - { - _main.cache += GetTitleID(); - _main.cache += '/'; - } + _main.cache += "vsh/"; + } + else if (!in_dev_flash && !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)); diff --git a/rpcs3/Emu/System.h b/rpcs3/Emu/System.h index adbc97e358..d6f8e59b8f 100644 --- a/rpcs3/Emu/System.h +++ b/rpcs3/Emu/System.h @@ -377,7 +377,7 @@ public: std::string GetFormattedTitle(double fps) const; - void ConfigurePPUCache(bool with_title_id = true) const; + void ConfigurePPUCache() const; std::set GetGameDirs() const; u32 AddGamesFromDir(const std::string& path);