MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / devicePollingCallback

Method devicePollingCallback

src/InputManager.cpp:120–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120Uint32 InputManager::devicePollingCallback(Uint32 interval, void* param)
121{
122 //this thing my be running in a different thread, so we're not allowed to call
123 //any functions or change/allocate/delete stuff, but can send a user event
124 SDL_Event event;
125 event.user.type = SDL_USEREVENT;
126 event.user.code = SDL_USEREVENT_POLLDEVICES;
127 event.user.data1 = nullptr;
128 event.user.data2 = nullptr;
129 if (SDL_PushEvent(&event) != 0) {
130 LOG(LogError) << "InputManager::devicePollingCallback - SDL event queue is full!";
131 }
132
133 return interval;
134}
135
136void InputManager::init()
137{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected