Implementing AM_InstallFirm
This commit is contained in:
parent
2741615b85
commit
29176f39ae
@ -97,6 +97,9 @@ Result AM_DeleteAppTitle(u8 mediatype, u64 titleID);
|
||||
/// Installs the current NATIVE_FIRM title to NAND (firm0:/ & firm1:/)
|
||||
Result AM_InstallNativeFirm(void);
|
||||
|
||||
/// Similar to InstallNativeFirm, but doesn't use AMPXI_GetTitleList (NATIVE_FIRM: 0004013800000002 or 0004013820000002 (N3DS))
|
||||
Result AM_InstallFirm(u64 titleID);
|
||||
|
||||
/**
|
||||
* @brief Gets the product code of a title.
|
||||
* @param mediatype Mediatype of the title.
|
||||
|
@ -199,6 +199,19 @@ Result AM_InstallNativeFirm(void)
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result AM_InstallFirm(u64 titleID){
|
||||
Result ret = 0;
|
||||
u32 *cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = IPC_MakeHeader(0x401,2,0); // 0x04010080
|
||||
cmdbuf[1] = titleID & 0xffffffff;
|
||||
cmdbuf[2] = (u32)(titleID >> 32);
|
||||
|
||||
if(R_FAILED(ret = svcSendSyncRequest(amHandle))) return ret;
|
||||
|
||||
return (Result)cmdbuf[1];
|
||||
}
|
||||
|
||||
Result AM_GetTitleProductCode(u8 mediatype, u64 titleID, char* productCode)
|
||||
{
|
||||
Result ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user