summaryrefslogtreecommitdiff
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index a85c94a4b..6239160bc 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -272,7 +272,15 @@ bool GMainWindow::InitializeSystem() {
272} 272}
273 273
274bool GMainWindow::LoadROM(const std::string& filename) { 274bool GMainWindow::LoadROM(const std::string& filename) {
275 Loader::ResultStatus result = Loader::LoadFile(filename); 275 std::unique_ptr<Loader::AppLoader> app_loader = Loader::GetLoader(filename);
276 if (!app_loader) {
277 LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", filename.c_str());
278 QMessageBox::critical(this, tr("Error while loading ROM!"),
279 tr("The ROM format is not supported."));
280 return false;
281 }
282
283 Loader::ResultStatus result = app_loader->Load();
276 if (Loader::ResultStatus::Success != result) { 284 if (Loader::ResultStatus::Success != result) {
277 LOG_CRITICAL(Frontend, "Failed to load ROM!"); 285 LOG_CRITICAL(Frontend, "Failed to load ROM!");
278 System::Shutdown(); 286 System::Shutdown();