From a31e53d57a73adfc3d994c12c1985adaa38553dc Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sun, 11 Feb 2018 15:44:49 -0500 Subject: [PATCH] Added disabled applet code for cmds Exit, LockExit, and UnlockExit. --- nx/source/services/applet.c | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/nx/source/services/applet.c b/nx/source/services/applet.c index 77c43003..f75991a4 100644 --- a/nx/source/services/applet.c +++ b/nx/source/services/applet.c @@ -58,6 +58,9 @@ static Result _appletGetPerformanceMode(u32 *out); static Result _appletSetOperationModeChangedNotification(u8 flag); static Result _appletSetPerformanceModeChangedNotification(u8 flag); +//static Result _appletSelfExit(void); +//static Result _appletLockExit(void); +//static Result _appletUnlockExit(void); Result appletInitialize(void) { @@ -658,6 +661,49 @@ static Result _appletGetCurrentFocusState(u8 *out) { return rc; } +/*static Result _appletCmdNoIO(Service* session, u64 cmd_id) { + IpcCommand c; + ipcInitialize(&c); + + struct { + u64 magic; + u64 cmd_id; + } *raw; + + raw = ipcPrepareHeader(&c, sizeof(*raw)); + + raw->magic = SFCI_MAGIC; + raw->cmd_id = cmd_id; + + Result rc = serviceIpcDispatch(session); + + if (R_SUCCEEDED(rc)) { + IpcParsedCommand r; + ipcParse(&r); + + struct { + u64 magic; + u64 result; + } *resp = r.Raw; + + rc = resp->result; + } + + return rc; +}*/ + +/*static Result _appletSelfExit(void) { + return _appletCmdNoIO(&g_appletISelfController, 0); +}*/ + +/*static Result _appletLockExit(void) { + return _appletCmdNoIO(&g_appletISelfController, 1); +} + +static Result _appletUnlockExit(void) { + return _appletCmdNoIO(&g_appletISelfController, 2); +}*/ + Result appletSetScreenShotPermission(s32 val) { IpcCommand c; ipcInitialize(&c);