diff options
author | Subv <subv2112@gmail.com> | 2016-11-26 23:13:40 -0500 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-11-27 18:03:48 -0500 |
commit | d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b (patch) | |
tree | 25b4b0c9fd1f316812c3eb74310b9a31f872a4f5 /src/citra_qt/main.cpp | |
parent | 1323ab2f5f1627b39e48b6f970ad8208fa7af71e (diff) |
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
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r-- | src/citra_qt/main.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 9589da4ba..a3887f9ab 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -299,16 +299,15 @@ bool GMainWindow::LoadROM(const std::string& filename) { return false; } - u32 system_mode; - Loader::ResultStatus load_result = app_loader->LoadKernelSystemMode(system_mode); - if (Loader::ResultStatus::Success != load_result) { - LOG_CRITICAL(Frontend, "Failed to load ROM!", load_result); + boost::optional<u32> system_mode = app_loader->LoadKernelSystemMode(); + if (!system_mode) { + LOG_CRITICAL(Frontend, "Failed to load ROM!"); QMessageBox::critical(this, tr("Error while loading ROM!"), tr("Could not determine the system mode.")); return false; } - if (!InitializeSystem(system_mode)) + if (!InitializeSystem(system_mode.get())) return false; Loader::ResultStatus result = app_loader->Load(); |