mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-30 21:32:50 +00:00
Savestates: Dont patch memory on load
This commit is contained in:
parent
4cd60aca22
commit
01ee119c59
@ -1339,6 +1339,11 @@ static void ppu_check_patch_spu_images(const ppu_module& mod, const ppu_segment&
|
|||||||
// Try to patch each segment, will only succeed if the address exists in SPU local storage
|
// Try to patch each segment, will only succeed if the address exists in SPU local storage
|
||||||
for (const auto& prog : obj.progs)
|
for (const auto& prog : obj.progs)
|
||||||
{
|
{
|
||||||
|
if (Emu.DeserialManager())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Apply the patch
|
// Apply the patch
|
||||||
applied += g_fxo->get<patch_engine>().apply(hash, [&](u32 addr, u32 /*size*/) { return addr + elf_header + prog.p_offset; }, prog.p_filesz, prog.p_vaddr);
|
applied += g_fxo->get<patch_engine>().apply(hash, [&](u32 addr, u32 /*size*/) { return addr + elf_header + prog.p_offset; }, prog.p_filesz, prog.p_vaddr);
|
||||||
|
|
||||||
@ -1807,7 +1812,7 @@ std::shared_ptr<lv2_prx> ppu_load_prx(const ppu_prx_object& elf, bool virtual_lo
|
|||||||
|
|
||||||
std::basic_string<u32> applied;
|
std::basic_string<u32> applied;
|
||||||
|
|
||||||
for (usz i = 0; i < prx->segs.size(); i++)
|
for (usz i = Emu.DeserialManager() ? prx->segs.size() : 0; i < prx->segs.size(); i++)
|
||||||
{
|
{
|
||||||
const auto& seg = prx->segs[i];
|
const auto& seg = prx->segs[i];
|
||||||
|
|
||||||
@ -2856,9 +2861,9 @@ std::pair<std::shared_ptr<lv2_overlay>, CellError> ppu_load_overlay(const ppu_ex
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Apply the patch
|
// Apply the patch
|
||||||
auto applied = g_fxo->get<patch_engine>().apply(hash, [ovlm](u32 addr, u32 size) { return ovlm->get_ptr<u8>(addr, size); });
|
auto applied = g_fxo->get<patch_engine>().apply(!Emu.DeserialManager() ? std::string{} : hash, [ovlm](u32 addr, u32 size) { return ovlm->get_ptr<u8>(addr, size); });
|
||||||
|
|
||||||
if (!Emu.GetTitleID().empty())
|
if (!Emu.DeserialManager() && !Emu.GetTitleID().empty())
|
||||||
{
|
{
|
||||||
// Alternative patch
|
// Alternative patch
|
||||||
applied += g_fxo->get<patch_engine>().apply(Emu.GetTitleID() + '-' + hash, [ovlm](u32 addr, u32 size) { return ovlm->get_ptr<u8>(addr, size); });
|
applied += g_fxo->get<patch_engine>().apply(Emu.GetTitleID() + '-' + hash, [ovlm](u32 addr, u32 size) { return ovlm->get_ptr<u8>(addr, size); });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user