mirror of
https://github.com/LumaTeam/Luma3DS.git
synced 2026-02-22 01:44:38 +00:00
Closes #1882. Whenever power button is held long enough ("force shutdown"), mcu sysmodule stores a flag in free reg 0. It will clear it next boot. During that next boot, if that flag was set and if CFG_BOOTENV.bit0 is set (warmboot/firm chainload, i.e. not coldbooting), then main() will simulate a "power button held" interrupt (after upgrading mcu fw if necessary -- it will reboot console after if it has upgraded mcu fw, I guess that's one of the reasons the flag is there). This obviously cause other processes to initiate a shutdown. In the case of autoboot, ns will panic when this happens.