input fix: clearBindings no borraba completamente el vector de asignaciones
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user