diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-11-28 02:04:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-28 02:04:11 +0100 |
commit | 3174bfd50c69dfa523671b96448113996a0bc42c (patch) | |
tree | 89575620a506d18c6fea2f8570c09bc0e9864263 /src/citra | |
parent | Merge pull request #2222 from linkmauve/die-frameskip-die (diff) | |
parent | Kernel/Loader: Grab the system mode from the NCCH ExHeader. (diff) | |
download | yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.tar yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.tar.gz yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.tar.bz2 yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.tar.lz yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.tar.xz yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.tar.zst yuzu-3174bfd50c69dfa523671b96448113996a0bc42c.zip |
Diffstat (limited to 'src/citra')
-rw-r--r-- | src/citra/citra.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index e47375f88..f9387e61c 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp @@ -129,15 +129,22 @@ 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; } + 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.get()); + SCOPE_EXIT({ System::Shutdown(); }); + Loader::ResultStatus load_result = loader->Load(); if (Loader::ResultStatus::Success != load_result) { LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); |