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
This commit is contained in:
parent
1323ab2f5f
commit
d171409f29
5 changed files with 27 additions and 27 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <boost/optional.hpp>
|
||||
#include "common/common_types.h"
|
||||
#include "common/file_util.h"
|
||||
|
||||
|
@ -97,13 +98,13 @@ public:
|
|||
|
||||
/**
|
||||
* Loads the system mode that this application needs.
|
||||
* This function defaults to 2 (96MB allocated to the application) if it can't read the information.
|
||||
* @param system_mode Out variable where the system mode will be stored.
|
||||
* @returns ResultStatus result of the operation
|
||||
* This function defaults to 2 (96MB allocated to the application) if it can't read the
|
||||
* information.
|
||||
* @returns Optional with the kernel system mode
|
||||
*/
|
||||
virtual ResultStatus LoadKernelSystemMode(u32& system_mode) {
|
||||
system_mode = 2; // 96MB allocated to the application.
|
||||
return ResultStatus::Success;
|
||||
virtual boost::optional<u32> LoadKernelSystemMode() {
|
||||
// 96MB allocated to the application.
|
||||
return 2;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue