Kernel/Loader: Grab the system mode from the NCCH ExHeader.
3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849
This commit is contained in:
parent
1323ab2f5f
commit
d171409f29
5 changed files with 27 additions and 27 deletions
|
@ -135,17 +135,17 @@ int main(int argc, char** argv) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
u32 system_mode;
|
||||
Loader::ResultStatus load_result = loader->LoadKernelSystemMode(system_mode);
|
||||
if (Loader::ResultStatus::Success != load_result) {
|
||||
LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result);
|
||||
boost::optional<u32> system_mode = loader->LoadKernelSystemMode();
|
||||
|
||||
if (!system_mode) {
|
||||
LOG_CRITICAL(Frontend, "Failed to load ROM (Could not determine system mode)!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
System::Init(emu_window.get(), system_mode);
|
||||
System::Init(emu_window.get(), system_mode.get());
|
||||
SCOPE_EXIT({ System::Shutdown(); });
|
||||
|
||||
load_result = loader->Load();
|
||||
Loader::ResultStatus load_result = loader->Load();
|
||||
if (Loader::ResultStatus::Success != load_result) {
|
||||
LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result);
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue