Skip to content

Commit cb0cd33

Browse files
authored
ns: Add appmemtype parameter to NS_RebootToTitle (#592)
1 parent 516e3a0 commit cb0cd33

File tree

2 files changed

+4
-3
lines changed
  • libctru
    • include/3ds/services
    • source/services

2 files changed

+4
-3
lines changed

libctru/include/3ds/services/ns.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags);
3737
* @brief Reboots to a title.
3838
* @param mediatype Mediatype of the title.
3939
* @param titleid ID of the title to launch.
40+
* @param appmemtype The memory type a title should be launched under.
4041
*/
41-
Result NS_RebootToTitle(u8 mediatype, u64 titleid);
42+
Result NS_RebootToTitle(u8 mediatype, u64 titleid, u8 appmemtype);
4243

4344
/**
4445
* @brief Terminates the process with the specified titleid.

libctru/source/services/ns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags)
8383
return (Result)cmdbuf[1];
8484
}
8585

86-
Result NS_RebootToTitle(u8 mediatype, u64 titleid)
86+
Result NS_RebootToTitle(u8 mediatype, u64 titleid, u8 appmemtype)
8787
{
8888
Result ret = 0;
8989
u32 *cmdbuf = getThreadCommandBuffer();
@@ -94,7 +94,7 @@ Result NS_RebootToTitle(u8 mediatype, u64 titleid)
9494
cmdbuf[3] = (titleid >> 32) & 0xffffffff;
9595
cmdbuf[4] = mediatype;
9696
cmdbuf[5] = 0x0; // reserved
97-
cmdbuf[6] = 0x0;
97+
cmdbuf[6] = appmemtype;
9898

9999
if(R_FAILED(ret = svcSendSyncRequest(nsHandle)))return ret;
100100

0 commit comments

Comments
 (0)