summaryrefslogtreecommitdiff
path: root/src/citra/citra.cpp
diff options
context:
space:
mode:
authorGravatar Emmanuel Gil Peyrot2016-05-17 23:06:33 +0100
committerGravatar Emmanuel Gil Peyrot2016-05-21 17:09:56 +0100
commit8fc9c0312660aa8b74a1251f02dfedc84da5b96b (patch)
tree490fc1f96a96654b59c933c864aa792161399cbb /src/citra/citra.cpp
parentAppveyor: Restore working directory after test_script (#1835) (diff)
downloadyuzu-8fc9c0312660aa8b74a1251f02dfedc84da5b96b.tar.gz
yuzu-8fc9c0312660aa8b74a1251f02dfedc84da5b96b.tar.xz
yuzu-8fc9c0312660aa8b74a1251f02dfedc84da5b96b.zip
Loader, Frontends: Refactor loader creation and game loading
This allows frontends to keep a single loader and use it multiple times e.g. for code loading and SMDH parsing.
Diffstat (limited to 'src/citra/citra.cpp')
-rw-r--r--src/citra/citra.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp
index b4501eb2e..aa3bf94ca 100644
--- a/src/citra/citra.cpp
+++ b/src/citra/citra.cpp
@@ -114,7 +114,13 @@ int main(int argc, char **argv) {
114 System::Init(emu_window.get()); 114 System::Init(emu_window.get());
115 SCOPE_EXIT({ System::Shutdown(); }); 115 SCOPE_EXIT({ System::Shutdown(); });
116 116
117 Loader::ResultStatus load_result = Loader::LoadFile(boot_filename); 117 std::unique_ptr<Loader::AppLoader> loader = Loader::GetFileLoader(boot_filename);
118 if (!loader) {
119 LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", boot_filename.c_str());
120 return -1;
121 }
122
123 Loader::ResultStatus load_result = loader->Load();
118 if (Loader::ResultStatus::Success != load_result) { 124 if (Loader::ResultStatus::Success != load_result) {
119 LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); 125 LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result);
120 return -1; 126 return -1;