Merge branch 'master' into great-refactor
Conflicts: libctru/include/3ds/services/apt.h libctru/include/3ds/services/fs.h libctru/source/services/apt.c
This commit is contained in:
commit
8912773f21
@ -99,6 +99,7 @@ Result APT_Enable(u32 a);
|
||||
Result APT_GetAppletManInfo(u8 inval, u8 *outval8, u32 *outval32, NS_APPID *menu_appid, NS_APPID *active_appid);
|
||||
Result APT_GetAppletInfo(NS_APPID appID, u64* pProgramID, u8* pMediaType, u8* pRegistered, u8* pLoadState, u32* pAttributes);
|
||||
Result APT_GetAppletProgramInfo(u32 id, u32 flags, u16 *titleversion);
|
||||
Result APT_GetProgramID(u64* pProgramID);
|
||||
Result APT_PrepareToJumpToHomeMenu(void);
|
||||
Result APT_JumpToHomeMenu(u32 a, u32 b, u32 c);
|
||||
Result APT_PrepareToJumpToApplication(u32 a);
|
||||
|
@ -150,6 +150,7 @@ Result FSUSER_GetSdmcArchiveResource(u32 *sectorSize, u32 *clusterSize, u32 *num
|
||||
Result FSUSER_GetNandArchiveResource(u32 *sectorSize, u32 *clusterSize, u32 *numClusters, u32 *freeClusters);
|
||||
Result FSUSER_IsSdmcDetected(u8 *detected);
|
||||
Result FSUSER_IsSdmcWritable(u8 *writable);
|
||||
Result FSUSER_GetMediaType(u8* mediatype);
|
||||
|
||||
Result FSFILE_Close(Handle handle);
|
||||
Result FSFILE_Read(Handle handle, u32 *bytesRead, u64 offset, void *buffer, u32 size);
|
||||
|
@ -825,6 +825,25 @@ Result APT_GetAppletProgramInfo(u32 id, u32 flags, u16 *titleversion)
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result APT_GetProgramID(u64* pProgramID)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0] = 0x00580002; //request header code
|
||||
cmdbuf[1] = 0x20;
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svcSendSyncRequest(aptuHandle)))return ret;
|
||||
|
||||
if(ret==0)ret = cmdbuf[1];
|
||||
|
||||
if(pProgramID)
|
||||
{
|
||||
if(ret==0) *pProgramID=((u64)cmdbuf[3]<<32)|cmdbuf[2];
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Result APT_IsRegistered(NS_APPID appID, u8* out)
|
||||
{
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
|
@ -966,6 +966,44 @@ FSUSER_IsSdmcDetected(u8 *detected)
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
/*! Get curent process mediatype
|
||||
*
|
||||
* @param[out] mediatype Output curent process mediatype
|
||||
*
|
||||
* @returns error
|
||||
*
|
||||
* @internal
|
||||
*
|
||||
* #### Request
|
||||
*
|
||||
* Index Word | Description
|
||||
* -----------|-------------------------
|
||||
* 0 | Header code [0x08680000]
|
||||
*
|
||||
* #### Response
|
||||
*
|
||||
* Index Word | Description
|
||||
* -----------|-------------------------
|
||||
* 0 | Header code
|
||||
* 1 | Result code
|
||||
*/
|
||||
Result
|
||||
FSUSER_GetMediaType(u8* mediatype)
|
||||
{
|
||||
u32* cmdbuf = getThreadCommandBuffer();
|
||||
|
||||
cmdbuf[0] = 0x08680000;
|
||||
|
||||
Result ret = 0;
|
||||
if((ret = svcSendSyncRequest(fsuHandle)))
|
||||
return ret;
|
||||
|
||||
if(mediatype)
|
||||
*mediatype = cmdbuf[2];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
/*! Check if SD card is writable
|
||||
*
|
||||
* @param[out] writable Output writable state
|
||||
|
Loading…
Reference in New Issue
Block a user