Merge pull request #11249 from JosJuice/load-dol-elf-after-mem

Boot: Load DOL/ELF after memory setup
This commit is contained in:
Admiral H. Curtiss 2022-11-06 05:40:54 +01:00 committed by GitHub
commit db679ab620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -540,12 +540,6 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
if (!executable.reader->IsValid())
return false;
if (!executable.reader->LoadIntoMemory())
{
PanicAlertFmtT("Failed to load the executable to memory.");
return false;
}
SetDefaultDisc();
SetupMSR();
@ -569,6 +563,12 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
SetupGCMemory();
}
if (!executable.reader->LoadIntoMemory())
{
PanicAlertFmtT("Failed to load the executable to memory.");
return false;
}
SConfig::OnNewTitleLoad();
PC = executable.reader->GetEntryPoint();