Added appletRequestExitToSelf.

This commit is contained in:
yellows8 2019-08-13 17:18:22 -04:00
parent 6017cba043
commit b09b2deb2d
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 15 additions and 0 deletions

View File

@ -1402,6 +1402,12 @@ Result appletGetNextReturnDestinationAppletIdentityInfo(AppletIdentityInfo *info
*/ */
Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode); Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode);
/**
* @brief Exits the current applet. Same as \ref appletHolderRequestExit except this is for the current applet.
* @note Only available with AppletType_LibraryApplet on [6.0.0+].
*/
Result appletRequestExitToSelf(void);
// IFunctions for AppletType_OverlayApplet (IOverlayFunctions). // IFunctions for AppletType_OverlayApplet (IOverlayFunctions).
/** /**

View File

@ -4201,6 +4201,15 @@ Result appletGetMainAppletApplicationDesiredLanguage(u64 *LanguageCode) {
return _appletCmdNoInOut64(&g_appletILibraryAppletSelfAccessor, LanguageCode, 60); return _appletCmdNoInOut64(&g_appletILibraryAppletSelfAccessor, LanguageCode, 60);
} }
Result appletRequestExitToSelf(void) {
if (__nx_applet_type != AppletType_LibraryApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (hosversionBefore(6,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _appletCmdNoIO(&g_appletILibraryAppletSelfAccessor, 80);
}
// IOverlayFunctions // IOverlayFunctions
Result appletBeginToWatchShortHomeButtonMessage(void) { Result appletBeginToWatchShortHomeButtonMessage(void) {