Added appletExitAndRequestToShowThanksMessage.

This commit is contained in:
yellows8 2019-08-16 21:10:35 -04:00
parent 287bb00981
commit b20147eeb7
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 19 additions and 0 deletions

View File

@ -1210,6 +1210,12 @@ Result appletRequestToShutdown(void);
*/
Result appletRequestToReboot(void);
/**
* @brief Exit the application and return to the kiosk demo menu. This terminates the current process. This will enter an infinite-sleep-loop on success.
* @note Only available with AppletType_*Application on [4.0.0+], on kiosk systems (QuestFlag set).
*/
Result appletExitAndRequestToShowThanksMessage(void);
/**
* @brief Initializes the ApplicationCopyrightFrameBuffer, with dimensions 1280x720 + the tmem for it. This is used as an overlay for screenshots.
* @note Only available with AppletType_*Application on 5.0.0+.

View File

@ -3880,6 +3880,19 @@ Result appletRequestToReboot(void) {
return rc;
}
Result appletExitAndRequestToShowThanksMessage(void) {
Result rc=0;
if (!serviceIsActive(&g_appletSrv) || !_appletIsApplication())
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (hosversionBefore(4,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
rc = _appletCmdNoIO(&g_appletIFunctions, 80);
if (R_SUCCEEDED(rc)) while(1)svcSleepThread(86400000000000ULL);
return rc;
}
static Result _appletInitializeApplicationCopyrightFrameBuffer(TransferMemory *tmem, s32 width, s32 height) {
IpcCommand c;
ipcInitialize(&c);