mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Added appletTerminateAllLibraryApplets/appletAreAnyLibraryAppletsLeft and appletApplicationTerminateAllLibraryApplets/appletApplicationAreAnyLibraryAppletsLeft.
This commit is contained in:
parent
e069da4320
commit
487aed9a59
@ -946,6 +946,18 @@ Result appletCreateLibraryApplet(AppletHolder *h, AppletId id, LibAppletMode mod
|
||||
*/
|
||||
Result appletCreateLibraryAppletSelf(AppletHolder *h, AppletId id, LibAppletMode mode);
|
||||
|
||||
/**
|
||||
* @brief TerminateAllLibraryApplets which were created by the current applet.
|
||||
* @note Normally LibraryApplet cleanup should be handled via \ref AppletHolder.
|
||||
*/
|
||||
Result appletTerminateAllLibraryApplets(void);
|
||||
|
||||
/**
|
||||
* @brief AreAnyLibraryAppletsLeft which were created by the current applet.
|
||||
* @param[out] out Output flag.
|
||||
*/
|
||||
Result appletAreAnyLibraryAppletsLeft(bool *out);
|
||||
|
||||
/// Closes an AppletHolder object.
|
||||
void appletHolderClose(AppletHolder *h);
|
||||
|
||||
@ -1548,6 +1560,17 @@ AppletApplicationExitReason appletApplicationGetExitReason(AppletApplication *a)
|
||||
*/
|
||||
Result appletApplicationRequestForApplicationToGetForeground(AppletApplication *a);
|
||||
|
||||
/**
|
||||
* @brief TerminateAllLibraryApplets which were created by the Application.
|
||||
*/
|
||||
Result appletApplicationTerminateAllLibraryApplets(AppletApplication *a);
|
||||
|
||||
/**
|
||||
* @brief AreAnyLibraryAppletsLeft which were created by the Application.
|
||||
* @param[out] out Output flag.
|
||||
*/
|
||||
Result appletApplicationAreAnyLibraryAppletsLeft(AppletApplication *a, bool *out);
|
||||
|
||||
/**
|
||||
* @brief Calls the same func as \ref appletHolderRequestExitOrTerminate with the output IAppletAccessor from the GetCurrentLibraryApplet cmd.
|
||||
* @param a \ref AppletApplication
|
||||
|
@ -2924,6 +2924,14 @@ Result appletCreateLibraryAppletSelf(AppletHolder *h, AppletId id, LibAppletMode
|
||||
return _appletHolderCreate(h, id, mode, true);
|
||||
}
|
||||
|
||||
Result appletTerminateAllLibraryApplets(void) {
|
||||
return _appletCmdNoIO(&g_appletILibraryAppletCreator, 1);
|
||||
}
|
||||
|
||||
Result appletAreAnyLibraryAppletsLeft(bool *out) {
|
||||
return _appletCmdNoInOutBool(&g_appletILibraryAppletCreator, out, 2);
|
||||
}
|
||||
|
||||
void appletHolderClose(AppletHolder *h) {
|
||||
eventClose(&h->PopInteractiveOutDataEvent);
|
||||
|
||||
@ -4569,6 +4577,20 @@ Result appletApplicationRequestForApplicationToGetForeground(AppletApplication *
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result appletApplicationTerminateAllLibraryApplets(AppletApplication *a) {
|
||||
if (!serviceIsActive(&a->s))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
|
||||
return _appletCmdNoIO(&a->s, 110);
|
||||
}
|
||||
|
||||
Result appletApplicationAreAnyLibraryAppletsLeft(AppletApplication *a, bool *out) {
|
||||
if (!serviceIsActive(&a->s))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
|
||||
|
||||
return _appletCmdNoInOutBool(&a->s, out, 111);
|
||||
}
|
||||
|
||||
Result appletApplicationRequestExitLibraryAppletOrTerminate(AppletApplication *a, u64 timeout) {
|
||||
Result rc=0;
|
||||
Service srv={0};
|
||||
|
Loading…
Reference in New Issue
Block a user