Skip to content

Commit cc5b884

Browse files
Fix NDMU_QueryStatus (#543)
1 parent c5ecf54 commit cc5b884

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

  • libctru

libctru/include/3ds/services/ndm.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ Result NDMU_ResumeScheduler(void);
111111
Result NDMU_GetCurrentState(ndmState *state);
112112

113113
/**
114-
* @brief Returns the daemon state.
115-
* @param state Pointer to write the daemons state to.
114+
* @brief Returns a daemon state.
115+
* @param daemon The specified daemon.
116+
* @param state Pointer to write the daemon state to.
116117
*/
117-
Result NDMU_QueryStatus(ndmDaemonStatus *status);
118+
Result NDMU_QueryStatus(ndmDaemon daemon, ndmDaemonStatus *status);
118119

119120
/**
120121
* @brief Sets the scan interval.

libctru/source/services/ndm.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,12 @@ Result NDMU_GetCurrentState(ndmState *state)
165165
return (Result)cmdbuf[1];
166166
}
167167

168-
Result NDMU_QueryStatus(ndmDaemonStatus *status)
168+
Result NDMU_QueryStatus(ndmDaemon daemon, ndmDaemonStatus *status)
169169
{
170170
u32* cmdbuf=getThreadCommandBuffer();
171171

172-
cmdbuf[0]=IPC_MakeHeader(0xD,1,0); // 0xD0000
172+
cmdbuf[0]=IPC_MakeHeader(0xD,1,0); // 0xD0040
173+
cmdbuf[1]=daemon;
173174

174175
Result ret=0;
175176
if(R_FAILED(ret=svcSendSyncRequest(ndmuHandle)))return ret;

0 commit comments

Comments
 (0)