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

Function ACT_Initialize

libctru/source/services/act.c:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43Result ACT_Initialize(u32 sdkVersion, u32 sharedMemSize, Handle sharedMem)
44{
45 Result ret = 0;
46 u32 *cmdbuf = getThreadCommandBuffer();
47
48 cmdbuf[0] = IPC_MakeHeader(0x1,2,4); // 0x10084
49 cmdbuf[1] = sdkVersion;
50 cmdbuf[2] = sharedMemSize;
51 cmdbuf[3] = IPC_Desc_CurProcessId();
52 // cmdbuf[4] = process id
53 cmdbuf[5] = IPC_Desc_SharedHandles(1);
54 cmdbuf[6] = sharedMem;
55
56 if (R_FAILED(ret = svcSendSyncRequest(actHandle))) return ret;
57
58 return (Result)cmdbuf[1];
59}
60
61Result ACT_ResultToErrorCode(Result code)
62{

Callers

nothing calls this directly

Calls 4

getThreadCommandBufferFunction · 0.85
IPC_MakeHeaderFunction · 0.85
IPC_Desc_CurProcessIdFunction · 0.85
IPC_Desc_SharedHandlesFunction · 0.85

Tested by

no test coverage detected