diff options
| author | 2016-11-26 23:13:40 -0500 | |
|---|---|---|
| committer | 2016-11-27 18:03:48 -0500 | |
| commit | d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b (patch) | |
| tree | 25b4b0c9fd1f316812c3eb74310b9a31f872a4f5 /src/citra/citra.cpp | |
| parent | Kernel/Loader: Grab the system mode from the NCCH ExHeader. (diff) | |
| download | yuzu-d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b.tar.gz yuzu-d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b.tar.xz yuzu-d171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b.zip | |
Kernel/Loader: Grab the system mode from the NCCH ExHeader.
3dsx and elf files default to system mode 2 (96MB allocated to the application).
This allows Home Menu to boot without modifications.
Closes #1849
Diffstat (limited to 'src/citra/citra.cpp')
| -rw-r--r-- | src/citra/citra.cpp | 12 |
1 files changed, 6 insertions, 6 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) { | |||
| 135 | return -1; | 135 | return -1; |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | u32 system_mode; | 138 | boost::optional<u32> system_mode = loader->LoadKernelSystemMode(); |
| 139 | Loader::ResultStatus load_result = loader->LoadKernelSystemMode(system_mode); | 139 | |
| 140 | if (Loader::ResultStatus::Success != load_result) { | 140 | if (!system_mode) { |
| 141 | LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); | 141 | LOG_CRITICAL(Frontend, "Failed to load ROM (Could not determine system mode)!"); |
| 142 | return -1; | 142 | return -1; |
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | System::Init(emu_window.get(), system_mode); | 145 | System::Init(emu_window.get(), system_mode.get()); |
| 146 | SCOPE_EXIT({ System::Shutdown(); }); | 146 | SCOPE_EXIT({ System::Shutdown(); }); |
| 147 | 147 | ||
| 148 | load_result = loader->Load(); | 148 | Loader::ResultStatus load_result = loader->Load(); |
| 149 | if (Loader::ResultStatus::Success != load_result) { | 149 | if (Loader::ResultStatus::Success != load_result) { |
| 150 | LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); | 150 | LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); |
| 151 | return -1; | 151 | return -1; |