Guest User

Untitled

a guest
Dec 17th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Result AM_GetStorageId(u64 *storageId, FS_MediaType mediatype, u64 titleId)
  2. {
  3. Result ret = 0;
  4. u32 *cmdbuf = getThreadCommandBuffer();
  5.  
  6. cmdbuf[0] = IPC_MakeHeader(0x6,3,0); // 0x000600C0
  7. cmdbuf[1] = mediatype;
  8. cmdbuf[2] = titleId & 0xffffffff;
  9. cmdbuf[3] = (u32)(titleId >> 32);
  10.  
  11. if(R_FAILED(ret = svcSendSyncRequest(amHandle))) return ret;
  12.  
  13. if(storageId) *storageId = (u64)cmdbuf[2] | ((u64)cmdbuf[3] << 32);
  14.  
  15. return (Result)cmdbuf[1];
  16. }
Add Comment
Please, Sign In to add comment