mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Added appletRequestLaunchApplicationWithUserAndArgumentForDebug.
This commit is contained in:
parent
2f3fa0030e
commit
19741cb103
@ -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
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user