diff options
| author | 2016-11-19 20:40:04 -0500 | |
|---|---|---|
| committer | 2016-11-19 20:40:04 -0500 | |
| commit | 1323ab2f5f1627b39e48b6f970ad8208fa7af71e (patch) | |
| tree | 6b3257864d76a4cdd3d8bb9847e55a2a51ff7573 /src/core/hle/kernel/kernel.cpp | |
| parent | Merge pull request #2172 from jroweboy/fix-mingw (diff) | |
| download | yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.gz yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.tar.xz yuzu-1323ab2f5f1627b39e48b6f970ad8208fa7af71e.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/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 9e1795927..0c8752670 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -124,13 +124,11 @@ void HandleTable::Clear() { | |||
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | /// Initialize the kernel | 126 | /// Initialize the kernel |
| 127 | void Init() { | 127 | void Init(u32 system_mode) { |
| 128 | ConfigMem::Init(); | 128 | ConfigMem::Init(); |
| 129 | SharedPage::Init(); | 129 | SharedPage::Init(); |
| 130 | 130 | ||
| 131 | // TODO(yuriks): The memory type parameter needs to be determined by the ExHeader field instead | 131 | Kernel::MemoryInit(system_mode); |
| 132 | // For now it defaults to the one with a largest allocation to the app | ||
| 133 | Kernel::MemoryInit(2); // Allocates 96MB to the application | ||
| 134 | 132 | ||
| 135 | Kernel::ResourceLimitsInit(); | 133 | Kernel::ResourceLimitsInit(); |
| 136 | Kernel::ThreadingInit(); | 134 | Kernel::ThreadingInit(); |