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

Function cfguInit

libctru/source/services/cfgu.c:13–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11static int cfguRefCount;
12
13Result cfguInit(void)
14{
15 Result ret;
16
17 if (AtomicPostIncrement(&cfguRefCount)) return 0;
18
19 // cfg:i has the most commands, then cfg:s, then cfg:u
20 ret = srvGetServiceHandle(&cfguHandle, "cfg:i");
21 if(R_FAILED(ret)) ret = srvGetServiceHandle(&cfguHandle, "cfg:s");
22 if(R_FAILED(ret)) ret = srvGetServiceHandle(&cfguHandle, "cfg:u");
23 if(R_FAILED(ret)) AtomicDecrement(&cfguRefCount);
24
25 return ret;
26}
27
28void cfguExit(void)
29{

Callers 3

osGetSystemVersionDataFunction · 0.85
ndspInitMasterFunction · 0.85
udsGenerateNodeInfoFunction · 0.85

Calls 1

srvGetServiceHandleFunction · 0.85

Tested by

no test coverage detected