Add NS_TerminateTitle() (#390)

This commit is contained in:
Kartik 2018-01-22 06:38:36 +05:30 committed by fincs
parent 2158f71eb2
commit 29418f4d3d
2 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,8 @@ Result NS_LaunchFIRM(u64 titleid);
*/
Result NS_LaunchTitle(u64 titleid, u32 launch_flags, u32 *procid);
/// Terminates the application from which this function is called
Result NS_TerminateTitle(void);
/**
* @brief Launches a title and the required firmware.
* @param titleid ID of the title to launch, 0 for gamecard.

View File

@ -56,6 +56,18 @@ Result NS_LaunchTitle(u64 titleid, u32 launch_flags, u32 *procid)
return (Result)cmdbuf[1];
}
Result NS_TerminateTitle(void)
{
Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer();
cmdbuf[0] = IPC_MakeHeader(0x3,0,0); // 0x30000
if(R_FAILED(ret = svcSendSyncRequest(nsHandle)))return ret;
return (Result)cmdbuf[1];
}
Result NS_LaunchApplicationFIRM(u64 titleid, u32 flags)
{
Result ret = 0;