summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorGravatar Subv2016-11-26 23:13:40 -0500
committerGravatar Subv2016-11-27 18:03:48 -0500
commitd171409f29ce3d8bcf7ed6ce16392b4b4ec97c4b (patch)
tree25b4b0c9fd1f316812c3eb74310b9a31f872a4f5 /src/core/loader/loader.h
parentKernel/Loader: Grab the system mode from the NCCH ExHeader. (diff)
downloadyuzu-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/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index e62f77b9c..5e3d46638 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -9,6 +9,7 @@
9#include <memory> 9#include <memory>
10#include <string> 10#include <string>
11#include <vector> 11#include <vector>
12#include <boost/optional.hpp>
12#include "common/common_types.h" 13#include "common/common_types.h"
13#include "common/file_util.h" 14#include "common/file_util.h"
14 15
@@ -97,13 +98,13 @@ public:
97 98
98 /** 99 /**
99 * Loads the system mode that this application needs. 100 * Loads the system mode that this application needs.
100 * This function defaults to 2 (96MB allocated to the application) if it can't read the information. 101 * This function defaults to 2 (96MB allocated to the application) if it can't read the
101 * @param system_mode Out variable where the system mode will be stored. 102 * information.
102 * @returns ResultStatus result of the operation 103 * @returns Optional with the kernel system mode
103 */ 104 */
104 virtual ResultStatus LoadKernelSystemMode(u32& system_mode) { 105 virtual boost::optional<u32> LoadKernelSystemMode() {
105 system_mode = 2; // 96MB allocated to the application. 106 // 96MB allocated to the application.
106 return ResultStatus::Success; 107 return 2;
107 } 108 }
108 109
109 /** 110 /**