Added appletLaunchDevMenu.

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

View File

@ -1381,6 +1381,13 @@ Result appletGetHomeButtonWriterLockAccessor(AppletLockAccessor *a);
*/
Result appletPopRequestLaunchApplicationForDebug(u128 *userIDs, s32 count, u64 *titleID, s32 *total_out);
/**
* @brief Launches DevMenu and the dev Overlay-applet. This will enter an infinite-sleep-loop on success.
* @note Only available with AppletType_SystemApplet on [8.0.0+].
* @note This verifies that DebugMode is enabled, then uses a ns cmd. That cmd then loads the system-settings for these two titleIDs (which normally only exist on devunits), and verifies that these titles are installed + launches them.
*/
Result appletLaunchDevMenu(void);
// IGlobalStateController
/**

View File

@ -4314,6 +4314,19 @@ Result appletPopRequestLaunchApplicationForDebug(u128 *userIDs, s32 count, u64 *
return rc;
}
Result appletLaunchDevMenu(void) {
Result rc=0;
if (__nx_applet_type != AppletType_SystemApplet)
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
if (hosversionBefore(8,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
rc = _appletCmdNoIO(&g_appletIFunctions, 200);
if (R_SUCCEEDED(rc)) _appletInfiniteSleepLoop();
return rc;
}
// IGlobalStateController
Result appletStartSleepSequence(bool flag) {