mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-23 03:06:52 -04:00
ams.mitm: add bpc handler, for reboot power button stuff
This commit is contained in:
parent
e715197290
commit
784964d49d
12 changed files with 226 additions and 26 deletions
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include <switch.h>
|
||||
#include "fatal_task_power.hpp"
|
||||
#include "fatal_payload_manager.hpp"
|
||||
#include "fatal_config.hpp"
|
||||
|
||||
bool PowerControlTask::TryShutdown() {
|
||||
|
@ -124,13 +123,11 @@ void PowerButtonObserveTask::WaitForPowerButton() {
|
|||
Result rc = 0;
|
||||
|
||||
if (check_vol_up && R_SUCCEEDED((rc = gpioPadGetValue(&vol_up_btn, &val))) && val == GpioValue_Low) {
|
||||
/* Tell exosphere to reboot to payload. */
|
||||
FatalPayloadManager::RebootToPayload();
|
||||
bpcRebootSystem();
|
||||
}
|
||||
|
||||
if (check_vol_down && R_SUCCEEDED((rc = gpioPadGetValue(&vol_down_btn, &val))) && val == GpioValue_Low) {
|
||||
/* Tell exosphere to reboot to payload. */
|
||||
FatalPayloadManager::RebootToPayload();
|
||||
bpcRebootSystem();
|
||||
}
|
||||
|
||||
if ((R_SUCCEEDED(rc = bpcGetSleepButtonState(&state)) && state == BpcSleepButtonState_Held) || (config->quest_flag && reboot_helper.TimedOut())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue