vsh.self: Fix execution on default settings (#10586)

This commit is contained in:
Eladash 2021-07-20 01:36:32 +03:00 committed by GitHub
parent aa08df0455
commit c84e5489f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1763,7 +1763,12 @@ bool ppu_load_exec(const ppu_exec_object& elf)
// Initialize memory stats (according to sdk version)
u32 mem_size;
if (sdk_version > 0x0021FFFF)
if (g_ps3_process_info.get_cellos_appname() == "vsh.self"sv)
{
// Because vsh.self comes before any generic application, more memory is available to it
mem_size = 0xF000000;
}
else if (sdk_version > 0x0021FFFF)
{
mem_size = 0xD500000;
}
@ -1794,13 +1799,6 @@ bool ppu_load_exec(const ppu_exec_object& elf)
mem_size += 0xC000000;
}
if (g_ps3_process_info.get_cellos_appname() == "vsh.self"sv)
{
// Because vsh.self comes before any generic application, more memory is available to it
// This is an estimation though (TODO)
mem_size += 0x800000;
}
g_fxo->init<lv2_memory_container>(mem_size)->used += primary_stacksize;
ppu->cmd_push({ppu_cmd::initialize, 0});