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

Method deinit

src/InputManager.cpp:189–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189void InputManager::deinit()
190{
191 stopPolling();
192
193 SDL_JoystickEventState(SDL_DISABLE);
194
195 if(!SDL_WasInit(SDL_INIT_JOYSTICK))
196 return;
197
198 if(mJoysticks != NULL)
199 {
200 for(int i = 0; i < mNumJoysticks; i++)
201 {
202 SDL_JoystickClose(mJoysticks[i]);
203 delete mInputConfigs[i];
204 }
205
206 delete[] mInputConfigs;
207 mInputConfigs = NULL;
208
209 delete[] mJoysticks;
210 mJoysticks = NULL;
211
212 delete mKeyboardInputConfig;
213 mKeyboardInputConfig = NULL;
214
215 delete[] mPrevAxisValues;
216 mPrevAxisValues = NULL;
217 }
218
219 SDL_QuitSubSystem(SDL_INIT_JOYSTICK | SDL_INIT_TIMER);
220
221 inputDevices.clear();
222}
223
224int InputManager::getNumJoysticks() { return mNumJoysticks; }
225int InputManager::getButtonCountByDevice(int id)

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected