diff options
author | Subv <subv2112@gmail.com> | 2016-11-20 02:40:04 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2016-11-20 02:40:04 +0100 |
commit | 1323ab2f5f1627b39e48b6f970ad8208fa7af71e (patch) | |
tree | 6b3257864d76a4cdd3d8bb9847e55a2a51ff7573 /src/citra/citra.cpp | |
parent | Merge pull request #2172 from jroweboy/fix-mingw (diff) | |
download | yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.gz yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.bz2 yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.lz yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.xz yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.zst yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/citra/citra.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index e47375f88..c742be231 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp @@ -129,16 +129,23 @@ int main(int argc, char** argv) { std::unique_ptr<EmuWindow_SDL2> emu_window = std::make_unique<EmuWindow_SDL2>(); - System::Init(emu_window.get()); - SCOPE_EXIT({ System::Shutdown(); }); - std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(boot_filename); if (!loader) { LOG_CRITICAL(Frontend, "Failed to obtain loader for %s!", boot_filename.c_str()); return -1; } - Loader::ResultStatus load_result = loader->Load(); + 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); + return -1; + } + + System::Init(emu_window.get(), system_mode); + SCOPE_EXIT({ System::Shutdown(); }); + + load_result = loader->Load(); if (Loader::ResultStatus::Success != load_result) { LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); return -1; |