From b896b33e3ece1a26be2d52bed8befaba7ff296c5 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Tue, 16 Jul 2019 15:47:47 -0400 Subject: [PATCH] Added appletEnterFatalSection/appletLeaveFatalSection. --- nx/include/switch/services/applet.h | 10 ++++++++++ nx/source/services/applet.c | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/nx/include/switch/services/applet.h b/nx/include/switch/services/applet.h index 72dd4eac..9496fe26 100644 --- a/nx/include/switch/services/applet.h +++ b/nx/include/switch/services/applet.h @@ -348,6 +348,16 @@ Result appletLockExit(void); /// Unlocks exiting, see \ref appletLockExit. Result appletUnlockExit(void); +/** + * @brief Enter FatalSection. + */ +Result appletEnterFatalSection(void); + +/** + * @brief Leave FatalSection. + */ +Result appletLeaveFatalSection(void); + /** * @brief Controls whether screenshot-capture is allowed. * @param permission \ref AppletScreenShotPermission diff --git a/nx/source/services/applet.c b/nx/source/services/applet.c index 7aac920d..be015ec0 100644 --- a/nx/source/services/applet.c +++ b/nx/source/services/applet.c @@ -2086,6 +2086,14 @@ Result appletUnlockExit(void) { return _appletCmdNoIO(&g_appletISelfController, 2); } +Result appletEnterFatalSection(void) { + return _appletCmdNoIO(&g_appletISelfController, 3); +} + +Result appletLeaveFatalSection(void) { + return _appletCmdNoIO(&g_appletISelfController, 4); +} + static Result _appletWaitLibraryAppletLaunchableEvent(void) { Result rc=0;