REPEAT_TRUE/FALSE → enum class Input::Repeat

This commit is contained in:
2026-05-16 19:51:24 +02:00
parent 479d9d941a
commit d72630523a
9 changed files with 42 additions and 41 deletions
+3 -3
View File
@@ -8,7 +8,7 @@
#include "core/audio/audio.hpp" // for Audio::update
#include "core/input/global_inputs.hpp" // for GlobalInputs::handle
#include "core/input/input.h" // for Input, REPEAT_FALSE, InputAction
#include "core/input/input.h" // for Input, Input::Repeat::OFF, InputAction
#include "core/locale/lang.h" // for Lang
#include "core/rendering/screen.h" // for Screen
#include "core/rendering/sprite.h" // for Sprite
@@ -211,7 +211,7 @@ void Instructions::checkEvents() {
// Comprueba las entradas
void Instructions::checkInput() {
#ifndef __EMSCRIPTEN__
if (Input::get()->checkInput(EXIT, REPEAT_FALSE)) {
if (Input::get()->checkInput(EXIT, Input::Repeat::OFF)) {
quit_requested_ = true;
finished_ = true;
return;
@@ -219,7 +219,7 @@ void Instructions::checkInput() {
#endif
if (GlobalInputs::handle()) { return; }
if (Input::get()->checkInput(PAUSE, REPEAT_FALSE) || Input::get()->checkInput(ACCEPT, REPEAT_FALSE) || Input::get()->checkInput(FIRE_LEFT, REPEAT_FALSE) || Input::get()->checkInput(FIRE_CENTER, REPEAT_FALSE) || Input::get()->checkInput(FIRE_RIGHT, REPEAT_FALSE)) {
if (Input::get()->checkInput(PAUSE, Input::Repeat::OFF) || Input::get()->checkInput(ACCEPT, Input::Repeat::OFF) || Input::get()->checkInput(FIRE_LEFT, Input::Repeat::OFF) || Input::get()->checkInput(FIRE_CENTER, Input::Repeat::OFF) || Input::get()->checkInput(FIRE_RIGHT, Input::Repeat::OFF)) {
if (mode_ == Mode::AUTO) {
finished_ = true;
} else {