mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Adust vsh cache dir criteria
This commit is contained in:
parent
bdeeae47a2
commit
c11c286206
3 changed files with 21 additions and 17 deletions
|
|
@ -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<std::string>& dir_queue, std::vector<ppu_
|
|||
obj.clear(), src.close(); // Clear decrypted file and elf object memory
|
||||
|
||||
_main.name = ' '; // Make ppu_finalize work
|
||||
Emu.ConfigurePPUCache(!Emu.IsPathInsideDir(_main.path, g_cfg_vfs.get_dev_flash()));
|
||||
Emu.ConfigurePPUCache();
|
||||
ppu_initialize(_main, false, file_size);
|
||||
spu_cache::initialize(false);
|
||||
ppu_finalize(_main, true);
|
||||
|
|
@ -4528,12 +4530,14 @@ bool ppu_initialize(const ppu_module& info, bool check_only, u64 file_size)
|
|||
|
||||
const std::string dev_flash = vfs::get("/dev_flash/");
|
||||
|
||||
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/"))
|
||||
{
|
||||
// Add prefix for vsh
|
||||
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")
|
||||
{
|
||||
// Add prefix for anything except dev_flash files, standalone elfs or PS1 classics
|
||||
cache_path += Emu.GetTitleID();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue