mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-04-23 13:04:50 +00:00
add applet exit locking to haze and reboot_to_payload
This commit is contained in:
parent
8b88351cb4
commit
4c57189025
2 changed files with 10 additions and 0 deletions
|
@ -17,6 +17,9 @@
|
|||
#include <haze/console_main_loop.hpp>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
/* Lock exit so that cleanup is ensured. */
|
||||
HAZE_R_ABORT_UNLESS(appletLockExit());
|
||||
|
||||
/* Load device firmware version and serial number. */
|
||||
HAZE_R_ABORT_UNLESS(haze::LoadDeviceProperties());
|
||||
|
||||
|
@ -24,5 +27,6 @@ int main(int argc, char **argv) {
|
|||
haze::ConsoleMainLoop::RunApplication();
|
||||
|
||||
/* Return to the loader. */
|
||||
appletUnlockExit();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -8,11 +8,17 @@
|
|||
#define IRAM_PAYLOAD_MAX_SIZE 0x24000
|
||||
static u8 g_reboot_payload[IRAM_PAYLOAD_MAX_SIZE];
|
||||
|
||||
void userAppInit(void)
|
||||
{
|
||||
appletLockExit();
|
||||
}
|
||||
|
||||
void userAppExit(void)
|
||||
{
|
||||
amsBpcExit();
|
||||
setsysExit();
|
||||
spsmExit();
|
||||
appletUnlockExit();
|
||||
}
|
||||
|
||||
static void reboot_to_payload(void) {
|
||||
|
|
Loading…
Add table
Reference in a new issue