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

Function envGetHandle

libctru/source/env.c:40–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40Handle __attribute__((weak)) envGetHandle(const char* name) {
41 if(__service_ptr == NULL)
42 return 0;
43
44 service_list_t* service_list = (service_list_t*) __service_ptr;
45 u32 i, num = service_list->num;
46
47 for(i=0; i<num; i++) {
48 if(__name_cmp(service_list->services[i].name, name) == 0)
49 return service_list->services[i].handle;
50 }
51
52 return 0;
53}
54
55void __attribute__((weak)) envDestroyHandles(void) {
56 if(__service_ptr == NULL)

Callers 6

srvGetServiceHandleFunction · 0.85
ndspFindAndLoadComponentFunction · 0.85
irrstInitFunction · 0.85
irrstExitFunction · 0.85
bossInitFunction · 0.85
fsInitFunction · 0.85

Calls 1

__name_cmpFunction · 0.85

Tested by

no test coverage detected