Skip to content

Commit

Permalink
Fix NDMU_QueryStatus (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
EpicUsername12 authored Sep 15, 2024
1 parent c5ecf54 commit cc5b884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions libctru/include/3ds/services/ndm.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ Result NDMU_ResumeScheduler(void);
Result NDMU_GetCurrentState(ndmState *state);

/**
* @brief Returns the daemon state.
* @param state Pointer to write the daemons state to.
* @brief Returns a daemon state.
* @param daemon The specified daemon.
* @param state Pointer to write the daemon state to.
*/
Result NDMU_QueryStatus(ndmDaemonStatus *status);
Result NDMU_QueryStatus(ndmDaemon daemon, ndmDaemonStatus *status);

/**
* @brief Sets the scan interval.
Expand Down
5 changes: 3 additions & 2 deletions libctru/source/services/ndm.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,12 @@ Result NDMU_GetCurrentState(ndmState *state)
return (Result)cmdbuf[1];
}

Result NDMU_QueryStatus(ndmDaemonStatus *status)
Result NDMU_QueryStatus(ndmDaemon daemon, ndmDaemonStatus *status)
{
u32* cmdbuf=getThreadCommandBuffer();

cmdbuf[0]=IPC_MakeHeader(0xD,1,0); // 0xD0000
cmdbuf[0]=IPC_MakeHeader(0xD,1,0); // 0xD0040
cmdbuf[1]=daemon;

Result ret=0;
if(R_FAILED(ret=svcSendSyncRequest(ndmuHandle)))return ret;
Expand Down

0 comments on commit cc5b884

Please sign in to comment.