Skip to content

Commit

Permalink
Added APT_GetAppletProgramInfo.
Browse files Browse the repository at this point in the history
  • Loading branch information
yellows8 committed Sep 24, 2015
1 parent 04ab998 commit 31b724a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions libctru/include/3ds/services/apt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_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);
Result APT_PrepareToJumpToApplication(Handle* handle, u32 a);
Expand Down
16 changes: 16 additions & 0 deletions libctru/source/services/apt.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,22 @@ Result APT_GetAppletManInfo(Handle* handle, u8 inval, u8 *outval8, u32 *outval32
return cmdbuf[1];
}

Result APT_GetAppletProgramInfo(Handle* handle, u32 id, u32 flags, u16 *titleversion)
{
if(!handle)handle=&aptuHandle;
u32* cmdbuf=getThreadCommandBuffer();
cmdbuf[0]=0x004D0080; //request header code
cmdbuf[1]=id;
cmdbuf[2]=flags;

Result ret=0;
if((ret=svcSendSyncRequest(*handle)))return ret;

if(titleversion)*titleversion=cmdbuf[2];

return cmdbuf[1];
}

Result APT_IsRegistered(Handle* handle, NS_APPID appID, u8* out)
{
if(!handle)handle=&aptuHandle;
Expand Down

0 comments on commit 31b724a

Please sign in to comment.