Added appletHolderRequestExit.

This commit is contained in:
yellows8 2019-03-04 10:42:07 -05:00
parent c10508d95e
commit d353213d72
2 changed files with 17 additions and 0 deletions

View File

@ -315,6 +315,12 @@ Result appletHolderGetIndirectLayerConsumerHandle(AppletHolder *h, u64 *out);
*/
Result appletHolderStart(AppletHolder *h);
/**
* @brief Requests the LibraryApplet to exit. The command is only used if \ref appletHolderCheckFinished returns false.
* @param h AppletHolder object.
*/
Result appletHolderRequestExit(AppletHolder *h);
/**
* @brief Waits for the LibraryApplet to exit.
* @param h AppletHolder object.

View File

@ -1955,6 +1955,17 @@ Result appletHolderStart(AppletHolder *h) {
return rc;
}
Result appletHolderRequestExit(AppletHolder *h) {
Result rc=0;
if (!serviceIsActive(&h->s))
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (!appletHolderCheckFinished(h)) rc = _appletCmdNoIO(&h->s, 20);//RequestExit
return rc;
}
void appletHolderJoin(AppletHolder *h) {
Result rc=0;
LibAppletExitReason res = LibAppletExitReason_Normal;