mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 04:52:39 +02:00
Added appletHolderTerminate.
This commit is contained in:
parent
0f8e18573d
commit
e069da4320
@ -979,6 +979,12 @@ Result appletHolderJump(AppletHolder *h);
|
|||||||
*/
|
*/
|
||||||
Result appletHolderRequestExit(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.
|
* @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.
|
* @param h AppletHolder object.
|
||||||
|
@ -2993,6 +2993,17 @@ Result appletHolderRequestExit(AppletHolder *h) {
|
|||||||
return rc;
|
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) {
|
static Result _appletAccessorRequestExitOrTerminate(Service* srv, u64 timeout) {
|
||||||
Result rc=0;
|
Result rc=0;
|
||||||
Event StateChangedEvent={0};
|
Event StateChangedEvent={0};
|
||||||
|
Loading…
Reference in New Issue
Block a user