From c9701f93b9dbf0b6cd07265ebd5a40132de0235b Mon Sep 17 00:00:00 2001 From: Alex Taber Date: Thu, 23 Nov 2017 20:32:26 -0500 Subject: [PATCH] Switch to APT_ResetHardwareAsync() for reboot (Closes #831) --- sysmodules/rosalina/source/menus.c | 6 ++++-- sysmodules/rosalina/source/menus/sysconfig.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sysmodules/rosalina/source/menus.c b/sysmodules/rosalina/source/menus.c index b66bc13..61a6c03 100644 --- a/sysmodules/rosalina/source/menus.c +++ b/sysmodules/rosalina/source/menus.c @@ -106,8 +106,10 @@ void RosalinaMenu_Reboot(void) u32 pressed = waitInputWithTimeout(1000); if(pressed & BUTTON_A) - svcKernelSetState(7); - else if(pressed & BUTTON_B) + { + APT_HardwareResetAsync(); + menuLeave(); + } else if(pressed & BUTTON_B) return; } while(!terminationRequest); diff --git a/sysmodules/rosalina/source/menus/sysconfig.c b/sysmodules/rosalina/source/menus/sysconfig.c index f54b417..2ca1302 100644 --- a/sysmodules/rosalina/source/menus/sysconfig.c +++ b/sysmodules/rosalina/source/menus/sysconfig.c @@ -68,7 +68,7 @@ void SysConfigMenu_ToggleLEDs(void) u8 result; mcuHwcReadRegister(0x28, &result, 1); result = ~result; - mcuHwcWriteRegister(40, &result, 1); + mcuHwcWriteRegister(0x28, &result, 1); mcuHwcExit(); } else if(pressed & BUTTON_B)