bpc.mitm: Make reboot type configurable
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <switch.h>
|
||||
#include <stratosphere.hpp>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include "bpcmitm_reboot_manager.hpp"
|
||||
#include "../utils.hpp"
|
||||
|
||||
@@ -43,7 +43,20 @@ void BpcRebootManager::Initialize() {
|
||||
|
||||
g_payload_loaded = true;
|
||||
|
||||
/* TODO: Figure out what kind of reboot we're gonna be doing. */
|
||||
/* Figure out what kind of reboot we're gonna be doing. */
|
||||
{
|
||||
char reboot_type[0x40] = {0};
|
||||
u64 reboot_type_size = 0;
|
||||
if (R_SUCCEEDED(Utils::GetSettingsItemValue("atmosphere", "power_menu_reboot_function", reboot_type, sizeof(reboot_type)-1, &reboot_type_size))) {
|
||||
if (strcasecmp(reboot_type, "stock") == 0 || strcasecmp(reboot_type, "normal") == 0 || strcasecmp(reboot_type, "standard") == 0) {
|
||||
g_reboot_type = BpcRebootType::Standard;
|
||||
} else if (strcasecmp(reboot_type, "rcm") == 0) {
|
||||
g_reboot_type = BpcRebootType::ToRcm;
|
||||
} else if (strcasecmp(reboot_type, "payload") == 0) {
|
||||
g_reboot_type = BpcRebootType::ToPayload;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ClearIram() {
|
||||
|
||||
Reference in New Issue
Block a user