fix DefineButtons i Title: ja no fa coses rares al definir la ultima tecla

This commit is contained in:
2025-06-21 14:13:36 +02:00
parent e8b67d3be1
commit f5731c8181
5 changed files with 65 additions and 45 deletions

View File

@@ -451,4 +451,17 @@ void Input::initSDL()
SDL_LogInfo(SDL_LOG_CATEGORY_TEST, "** SDL_GAMEPAD: INITIALIZATION COMPLETE\n");
}
}
}
void Input::resetInputStates() {
// Resetear todos los KeyBindings.active a false
for (auto &key : key_bindings_) {
key.active = false;
}
// Resetear todos los ControllerBindings.active a false
for (auto &controller_vec : controller_bindings_) {
for (auto &binding : controller_vec) {
binding.active = false;
}
}
}