summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorGravatar Subv2016-11-19 20:40:04 -0500
committerGravatar Subv2016-11-19 20:40:04 -0500
commit1323ab2f5f1627b39e48b6f970ad8208fa7af71e (patch)
tree6b3257864d76a4cdd3d8bb9847e55a2a51ff7573 /src/core/loader/loader.h
parentMerge pull request #2172 from jroweboy/fix-mingw (diff)
downloadyuzu-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/loader/loader.h')
-rw-r--r--src/core/loader/loader.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index 9652d7ac5..e62f77b9c 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -96,6 +96,17 @@ public:
96 virtual ResultStatus Load() = 0; 96 virtual ResultStatus Load() = 0;
97 97
98 /** 98 /**
99 * 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 * @param system_mode Out variable where the system mode will be stored.
102 * @returns ResultStatus result of the operation
103 */
104 virtual ResultStatus LoadKernelSystemMode(u32& system_mode) {
105 system_mode = 2; // 96MB allocated to the application.
106 return ResultStatus::Success;
107 }
108
109 /**
99 * Get the code (typically .code section) of the application 110 * Get the code (typically .code section) of the application
100 * @param buffer Reference to buffer to store data 111 * @param buffer Reference to buffer to store data
101 * @return ResultStatus result of function 112 * @return ResultStatus result of function