MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / deinit

Method deinit

src/server/gui/core/InputManager.cpp:133–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void InputManager::deinit()
134{
135 if(!initialized())
136 return;
137
138 for(auto iter = mJoysticks.cbegin(); iter != mJoysticks.cend(); iter++)
139 {
140 SDL_JoystickClose(iter->second);
141 }
142 mJoysticks.clear();
143
144 for(auto iter = mInputConfigs.cbegin(); iter != mInputConfigs.cend(); iter++)
145 {
146 delete iter->second;
147 }
148 mInputConfigs.clear();
149
150 for(auto iter = mPrevAxisValues.cbegin(); iter != mPrevAxisValues.cend(); iter++)
151 {
152 delete[] iter->second;
153 }
154 mPrevAxisValues.clear();
155
156 if(mKeyboardInputConfig != NULL)
157 {
158 delete mKeyboardInputConfig;
159 mKeyboardInputConfig = NULL;
160 }
161
162 if(mCECInputConfig != NULL)
163 {
164 delete mCECInputConfig;
165 mCECInputConfig = NULL;
166 }
167
168 CECInput::deinit();
169
170 SDL_JoystickEventState(SDL_DISABLE);
171 SDL_QuitSubSystem(SDL_INIT_JOYSTICK);
172}
173
174int InputManager::getNumJoysticks() { return (int)mJoysticks.size(); }
175

Callers

nothing calls this directly

Calls 2

deinitFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected