Merge pull request #174 from Megazig/master
implement APT_GetAppletInfo
This commit is contained in:
commit
0c21183b7e
@ -97,6 +97,7 @@ Result APT_Finalize(Handle* handle, NS_APPID appId);
|
||||
Result APT_HardwareResetAsync(Handle* handle);
|
||||
Result APT_Enable(Handle* handle, u32 a);
|
||||
Result APT_GetAppletManInfo(Handle* handle, u8 inval, u8 *outval8, u32 *outval32, NS_APPID *menu_appid, NS_APPID *active_appid);
|
||||
Result APT_GetAppletInfo(Handle* handle, NS_APPID appID);
|
||||
Result APT_GetAppletProgramInfo(Handle* handle, u32 id, u32 flags, u16 *titleversion);
|
||||
Result APT_PrepareToJumpToHomeMenu(Handle* handle);
|
||||
Result APT_JumpToHomeMenu(Handle* handle, u32 a, u32 b, u32 c);
|
||||
|
@ -798,6 +798,25 @@ Result APT_GetAppletManInfo(Handle* handle, u8 inval, u8 *outval8, u32 *outval32
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result APT_GetAppletInfo(Handle* handle, NS_APPID appID, u64* pProgramID, u8* pMediaType, u8* pRegistered, u8* pLoadState, u32* pAttributes)
|
||||
{
|
||||
if(!handle)handle=&aptuHandle;
|
||||
u32* cmdbuf=getThreadCommandBuffer();
|
||||
cmdbuf[0]=0x00060040; //request header code
|
||||
cmdbuf[1]=appID;
|
||||
|
||||
Result ret=0;
|
||||
if((ret=svcSendSyncRequest(*handle)))return ret;
|
||||
|
||||
if(pProgramID)*pProgramID=(u64)cmdbuf[2]|((u64)cmdbuf[3]<<32);
|
||||
if(pMediaType)*pMediaType=cmdbuf[4];
|
||||
if(pRegistered)*pRegistered=cmdbuf[5];
|
||||
if(pLoadState)*pLoadState=cmdbuf[6];
|
||||
if(pAttributes)*pAttributes=cmdbuf[7];
|
||||
|
||||
return cmdbuf[1];
|
||||
}
|
||||
|
||||
Result APT_GetAppletProgramInfo(Handle* handle, u32 id, u32 flags, u16 *titleversion)
|
||||
{
|
||||
if(!handle)handle=&aptuHandle;
|
||||
|
Loading…
Reference in New Issue
Block a user