Added appletHolderTerminate.

This commit is contained in:
yellows8 2019-08-20 11:44:55 -04:00
parent 0f8e18573d
commit e069da4320
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 17 additions and 0 deletions

View File

@ -979,6 +979,12 @@ Result appletHolderJump(AppletHolder *h);
*/
Result appletHolderRequestExit(AppletHolder *h);
/**
* @brief Terminate the LibraryApplet.
* @param h AppletHolder object.
*/
Result appletHolderTerminate(AppletHolder *h);
/**
* @brief Uses cmds GetAppletStateChangedEvent and RequestExit, then waits for the LibraryApplet to exit with the specified timeout. If a timeout occurs, the Terminate cmd is used.
* @param h AppletHolder object.

View File

@ -2993,6 +2993,17 @@ Result appletHolderRequestExit(AppletHolder *h) {
return rc;
}
Result appletHolderTerminate(AppletHolder *h) {
Result rc=0;
if (!serviceIsActive(&h->s))
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
rc = _appletCmdNoIO(&h->s, 25);//Terminate
return rc;
}
static Result _appletAccessorRequestExitOrTerminate(Service* srv, u64 timeout) {
Result rc=0;
Event StateChangedEvent={0};