summaryrefslogtreecommitdiff
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
authorGravatar Subv2016-11-26 23:13:40 -0500
committerGravatar Subv2016-11-27 18:03:48 -0500
commitd171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b (patch)
tree25b4b0c9fd1f316812c3eb74310b9a31f872a4f5 /src/citra_qt/main.cpp
parentKernel/Loader: Grab the system mode from the NCCH ExHeader. (diff)
downloadyuzu-d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b.tar.gz
yuzu-d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b.tar.xz
yuzu-d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b.zip
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.cpp9
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) {
299 return false; 299 return false;
300 } 300 }
301 301
302 u32 system_mode; 302 boost::optional<u32> system_mode = app_loader->LoadKernelSystemMode();
303 Loader::ResultStatus load_result = app_loader->LoadKernelSystemMode(system_mode); 303 if (!system_mode) {
304 if (Loader::ResultStatus::Success != load_result) { 304 LOG_CRITICAL(Frontend, "Failed to load ROM!");
305 LOG_CRITICAL(Frontend, "Failed to load ROM!", load_result);
306 QMessageBox::critical(this, tr("Error while loading ROM!"), 305 QMessageBox::critical(this, tr("Error while loading ROM!"),
307 tr("Could not determine the system mode.")); 306 tr("Could not determine the system mode."));
308 return false; 307 return false;
309 } 308 }
310 309
311 if (!InitializeSystem(system_mode)) 310 if (!InitializeSystem(system_mode.get()))
312 return false; 311 return false;
313 312
314 Loader::ResultStatus result = app_loader->Load(); 313 Loader::ResultStatus result = app_loader->Load();