Add NS_TerminateTitle

This commit is contained in:
Pirater12 2018-01-17 22:44:08 +05:30
parent 6a5440f845
commit 24c53bc914
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;