mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-26 12:42:41 +01:00
Fix Create PPU Cache
This commit is contained in:
parent
b0a346709e
commit
a560121775
@ -1682,7 +1682,7 @@ void ppu_unload_prx(const lv2_prx& prx)
|
||||
}
|
||||
}
|
||||
|
||||
bool ppu_load_exec(const ppu_exec_object& elf, utils::serial* ar)
|
||||
bool ppu_load_exec(const ppu_exec_object& elf, const std::string& elf_path, utils::serial* ar)
|
||||
{
|
||||
if (elf != elf_error::ok)
|
||||
{
|
||||
@ -2126,7 +2126,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, utils::serial* ar)
|
||||
|
||||
// Set path (TODO)
|
||||
_main.name.clear();
|
||||
_main.path = vfs::get(Emu.argv[0]);
|
||||
_main.path = elf_path;
|
||||
|
||||
_main.elf_entry = static_cast<u32>(elf.header.e_entry);
|
||||
_main.seg0_code_end = end;
|
||||
|
@ -70,7 +70,7 @@ std::string g_cfg_defaults;
|
||||
|
||||
atomic_t<u64> g_watchdog_hold_ctr{0};
|
||||
|
||||
extern bool ppu_load_exec(const ppu_exec_object&, utils::serial* = nullptr);
|
||||
extern bool ppu_load_exec(const ppu_exec_object&, const std::string&, utils::serial* = nullptr);
|
||||
extern void spu_load_exec(const spu_exec_object&);
|
||||
extern void spu_load_rel_exec(const spu_rel_object&);
|
||||
extern void ppu_precompile(std::vector<std::string>& dir_queue, std::vector<ppu_module*>* loaded_prx);
|
||||
@ -1383,7 +1383,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
||||
|
||||
const ppu_exec_object obj = src;
|
||||
|
||||
if (obj == elf_error::ok && ppu_load_exec(obj))
|
||||
if (obj == elf_error::ok && ppu_load_exec(obj, path))
|
||||
{
|
||||
g_fxo->get<main_ppu_module>().path = path;
|
||||
}
|
||||
@ -1960,7 +1960,7 @@ game_boot_result Emulator::Load(const std::string& title_id, bool is_disc_patch,
|
||||
|
||||
g_fxo->init<main_ppu_module>();
|
||||
|
||||
if (ppu_load_exec(ppu_exec, DeserialManager()))
|
||||
if (ppu_load_exec(ppu_exec, m_path, DeserialManager()))
|
||||
{
|
||||
}
|
||||
// Overlay (OVL) executable (only load it)
|
||||
|
@ -1564,7 +1564,7 @@ bool game_list_frame::CreatePPUCache(const std::string& path, const std::string&
|
||||
Emu.GracefulShutdown(false);
|
||||
Emu.SetForceBoot(true);
|
||||
|
||||
if (const auto error = Emu.BootGame(path, serial, true); error != game_boot_result::no_errors)
|
||||
if (const auto error = Emu.BootGame(fs::is_file(path) ? fs::get_parent_dir(path) : path, serial, true); error != game_boot_result::no_errors)
|
||||
{
|
||||
game_list_log.error("Could not create PPU Cache for %s, error: %s", path, error);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user