diff --git a/units/input.cpp b/units/input.cpp index 5597f6c..c2158ac 100644 --- a/units/input.cpp +++ b/units/input.cpp @@ -11,11 +11,13 @@ Input::Input(string file, bool verbose) keyBindings_t kb; kb.scancode = 0; kb.active = false; + keyBindings.clear(); keyBindings.resize(INPUT_TOTAL, kb); GameControllerBindings_t gcb; gcb.button = SDL_CONTROLLER_BUTTON_INVALID; gcb.active = false; + gameControllerBindings.clear(); gameControllerBindings.resize(INPUT_TOTAL, gcb); this->verbose = verbose; @@ -359,10 +361,12 @@ void Input::clearBindings() keyBindings_t kb; kb.scancode = 0; kb.active = false; + keyBindings.clear(); keyBindings.resize(INPUT_TOTAL, kb); GameControllerBindings_t gcb; gcb.button = SDL_CONTROLLER_BUTTON_INVALID; gcb.active = false; + gameControllerBindings.clear(); gameControllerBindings.resize(INPUT_TOTAL, gcb); } \ No newline at end of file