mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-08 09:09:46 +00:00
Minor simplifcation in ppu_finalize
This commit is contained in:
parent
1e7b2c052a
commit
3c79f3943f
1 changed files with 18 additions and 22 deletions
|
@ -2807,36 +2807,32 @@ extern fs::file make_file_view(fs::file&& _file, u64 offset)
|
||||||
|
|
||||||
extern void ppu_finalize(const ppu_module& info)
|
extern void ppu_finalize(const ppu_module& info)
|
||||||
{
|
{
|
||||||
// Get cache path for this executable
|
|
||||||
std::string cache_path;
|
|
||||||
|
|
||||||
if (info.name.empty())
|
if (info.name.empty())
|
||||||
{
|
{
|
||||||
// Don't remove main module from memory
|
// Don't remove main module from memory
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
const std::string dev_flash = vfs::get("/dev_flash/sys/");
|
||||||
|
|
||||||
|
if (info.path.starts_with(dev_flash) || Emu.GetCat() == "1P")
|
||||||
{
|
{
|
||||||
// Get PPU cache location
|
// Don't remove dev_flash prx from memory
|
||||||
cache_path = fs::get_cache_dir() + "cache/";
|
return;
|
||||||
|
|
||||||
const std::string dev_flash = vfs::get("/dev_flash/sys/");
|
|
||||||
|
|
||||||
if (info.path.starts_with(dev_flash) || Emu.GetCat() == "1P")
|
|
||||||
{
|
|
||||||
// Don't remove dev_flash prx from memory
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (!Emu.GetTitleID().empty())
|
|
||||||
{
|
|
||||||
cache_path += Emu.GetTitleID();
|
|
||||||
cache_path += '/';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add PPU hash and filename
|
|
||||||
fmt::append(cache_path, "ppu-%s-%s/", fmt::base57(info.sha1), info.path.substr(info.path.find_last_of('/') + 1));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get cache path for this executable
|
||||||
|
std::string cache_path = fs::get_cache_dir() + "cache/";
|
||||||
|
|
||||||
|
if (!Emu.GetTitleID().empty())
|
||||||
|
{
|
||||||
|
cache_path += Emu.GetTitleID();
|
||||||
|
cache_path += '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add PPU hash and filename
|
||||||
|
fmt::append(cache_path, "ppu-%s-%s/", fmt::base57(info.sha1), info.path.substr(info.path.find_last_of('/') + 1));
|
||||||
|
|
||||||
#ifdef LLVM_AVAILABLE
|
#ifdef LLVM_AVAILABLE
|
||||||
g_fxo->get<jit_module_manager>().remove(cache_path + info.name);
|
g_fxo->get<jit_module_manager>().remove(cache_path + info.name);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue