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

Function hidExit

libctru/source/services/hid.c:85–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void hidExit(void)
86{
87 if (AtomicDecrement(&hidRefCount)) return;
88
89 // Reset internal state.
90 kOld = kHeld = kDown = kUp = 0;
91
92 // Unmap HID sharedmem and close handles.
93 int i; for(i=0; i<5; i++)svcCloseHandle(hidEvents[i]);
94 svcUnmapMemoryBlock(hidMemHandle, (u32)hidSharedMem);
95 svcCloseHandle(hidMemHandle);
96 svcCloseHandle(hidHandle);
97
98 if(usingIrrst)
99 irrstExit();
100
101 if(hidSharedMem != NULL)
102 {
103 mappableFree((void*) hidSharedMem);
104 hidSharedMem = NULL;
105 }
106}
107
108void hidSetRepeatParameters(u32 delay, u32 interval)
109{

Callers 1

__appExitFunction · 0.85

Calls 2

irrstExitFunction · 0.85
mappableFreeFunction · 0.85

Tested by

no test coverage detected