Adust vsh cache dir criteria

This commit is contained in:
Megamouse 2024-05-04 00:09:38 +02:00
parent bdeeae47a2
commit c11c286206
3 changed files with 21 additions and 17 deletions

View file

@ -3695,23 +3695,23 @@ s32 error_code::error_report(s32 result, const logs::message* channel, const cha
return result;
}
void Emulator::ConfigurePPUCache(bool with_title_id) const
void Emulator::ConfigurePPUCache() const
{
auto& _main = g_fxo->get<main_ppu_module>();
_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));