]> Chaos Git - corbenik/ctrulib.git/commitdiff
Fixed AM_InstallFIRM(). See 3dbrew.
authorprofi200 <fd3194@gmx.de>
Sun, 1 Mar 2015 20:52:19 +0000 (21:52 +0100)
committerprofi200 <fd3194@gmx.de>
Sun, 1 Mar 2015 20:52:19 +0000 (21:52 +0100)
libctru/include/3ds/services/am.h
libctru/source/services/am.c

index b1d5db2523704f8b879a76a7bbaf4e188e3cbebe..3eb1501671970382119283cfcb551b8cddbb57f0 100644 (file)
@@ -107,10 +107,9 @@ Result AM_DeleteAppTitle(u8 mediatype, u64 titleID);
 About: Installs FIRM to NAND (firm0:/ & firm1:/) from a CXI
 Note: The title must have the uniqueid: 0x00000, otherwise this will fail.
 
-  mediatype            mediatype of title
   titleid              title id of title
 */
-Result AM_InstallFIRM(u8 mediatype, u64 titleID);
+Result AM_InstallFIRM(u64 titleID);
 
 /* AM_GetTitleProductCode()
 About: Gets the product code of a title based on its title id.
index e6c84a8eed07adfa7a726e5573c7b09fdb396a75..e80faffee20b3e40ba4ae179d048ec24024e43d7 100644 (file)
@@ -171,15 +171,14 @@ Result AM_DeleteAppTitle(u8 mediatype, u64 titleID)
        return (Result)cmdbuf[1];
 }
 
-Result AM_InstallFIRM(u8 mediatype, u64 titleID)
+Result AM_InstallFIRM(u64 titleID)
 {
        Result ret = 0;
        u32 *cmdbuf = getThreadCommandBuffer();
 
-       cmdbuf[0] = 0x000400C0;
-       cmdbuf[1] = mediatype;
-       cmdbuf[2] = titleID & 0xffffffff;
-       cmdbuf[3] = (u32)(titleID >> 32);
+       cmdbuf[0] = 0x04010080;
+       cmdbuf[1] = titleID & 0xffffffff;
+       cmdbuf[2] = (u32)(titleID >> 32);
 
        if((ret = svcSendSyncRequest(amHandle))!=0) return ret;