Added appletRequestLaunchApplicationWithUserAndArgumentForDebug.

This commit is contained in:
yellows8 2019-08-16 23:56:29 -04:00
parent 2f3fa0030e
commit 19741cb103
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 53 additions and 0 deletions

View File

@ -1709,6 +1709,17 @@ Result appletPerformSystemButtonPressing(AppletSystemButtonType type);
*/ */
Result appletInvalidateTransitionLayer(void); Result appletInvalidateTransitionLayer(void);
/**
* @brief Requests to launch the specified Application, with the specified users.
* @note Only available on [6.0.0+].
* @param[in] userIDs Input array of userIDs.
* @param[in] total_userIDs Total input userIDs, must be <=ACC_USER_LIST_SIZE.
* @param[in] flag Whether to use the specified buffer to create a storage which will be pushed for ::AppletLaunchParameterKind_UserChannel.
* @param[in] buffer Buffer containing the above storage data.
* @param[in] size Size of the storage buffer.
*/
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, u128 *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size);
// State / other // State / other
/** /**

View File

@ -4795,6 +4795,48 @@ Result appletInvalidateTransitionLayer(void) {
return _appletCmdNoIO(&g_appletIDebugFunctions, 20); return _appletCmdNoIO(&g_appletIDebugFunctions, 20);
} }
Result appletRequestLaunchApplicationWithUserAndArgumentForDebug(u64 titleID, u128 *userIDs, size_t total_userIDs, bool flag, const void* buffer, size_t size) {
if (hosversionBefore(6,0,0))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
IpcCommand c;
ipcInitialize(&c);
ipcAddSendBuffer(&c, userIDs, total_userIDs*sizeof(u128), BufferType_Normal);
ipcAddSendBuffer(&c, buffer, size, BufferType_Normal);
struct {
u64 magic;
u64 cmd_id;
u8 flag;
u64 titleID;
} *raw;
raw = serviceIpcPrepareHeader(&g_appletIDebugFunctions, &c, sizeof(*raw));
raw->magic = SFCI_MAGIC;
raw->cmd_id = 30;
raw->flag = flag!=0;
raw->titleID = titleID;
Result rc = serviceIpcDispatch(&g_appletIDebugFunctions);
if (R_SUCCEEDED(rc)) {
IpcParsedCommand r;
struct {
u64 magic;
u64 result;
} *resp;
serviceIpcParse(&g_appletIDebugFunctions, &r, sizeof(*resp));
resp = r.Raw;
rc = resp->result;
}
return rc;
}
// State / other // State / other
u8 appletGetOperationMode(void) { u8 appletGetOperationMode(void) {