summaryrefslogtreecommitdiffstats
path: root/src/citra
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/citra/citra.cpp12
-rw-r--r--src/citra_qt/main.cpp9
2 files changed, 10 insertions, 11 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp
index c742be231..f9387e61c 100644
--- a/src/citra/citra.cpp
+++ b/src/citra/citra.cpp
@@ -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;
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();