MCPcopy Create free account
hub / github.com/devkitPro/libctru / aptSendCommand

Function aptSendCommand

libctru/source/services/apt.c:150–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150Result aptSendCommand(u32* aptcmdbuf)
151{
152 Handle aptuHandle;
153
154 if (aptLockHandle) svcWaitSynchronization(aptLockHandle, U64_MAX);
155 Result res = aptGetServiceHandle(&aptuHandle);
156 if (R_SUCCEEDED(res))
157 {
158 u32* cmdbuf = getThreadCommandBuffer();
159 memcpy(cmdbuf, aptcmdbuf, 4*countPrmWords(aptcmdbuf[0]));
160 res = svcSendSyncRequest(aptuHandle);
161 if (R_SUCCEEDED(res))
162 {
163 memcpy(aptcmdbuf, cmdbuf, 4*countPrmWords(cmdbuf[0]));
164 res = aptcmdbuf[1];
165 }
166 svcCloseHandle(aptuHandle);
167 }
168 if (aptLockHandle) svcReleaseMutex(aptLockHandle);
169 return res;
170}
171
172static void aptInitCaptureInfo(aptCaptureBufInfo* capinfo, const GSPGPU_CaptureInfo* gspcapinfo)
173{

Callers 15

APT_GetLockHandleFunction · 0.85
APT_InitializeFunction · 0.85
APT_FinalizeFunction · 0.85
APT_HardwareResetAsyncFunction · 0.85
APT_EnableFunction · 0.85
APT_GetAppletManInfoFunction · 0.85
APT_GetAppletInfoFunction · 0.85
APT_GetAppletProgramInfoFunction · 0.85
APT_GetProgramIDFunction · 0.85
APT_IsRegisteredFunction · 0.85
APT_InquireNotificationFunction · 0.85

Calls 3

aptGetServiceHandleFunction · 0.85
getThreadCommandBufferFunction · 0.85
countPrmWordsFunction · 0.85

Tested by

no test coverage detected