migrant input: corregit GamepadManager.swapPlayers()
This commit is contained in:
@@ -213,12 +213,12 @@ void Title::printColorValue(const Color& color) {
|
||||
void Title::handleControlKeys(SDL_Keycode key) {
|
||||
switch (key) {
|
||||
case SDLK_1:
|
||||
define_buttons_->enable(&Options::gamepads.getGamepad(Player::Id::PLAYER1));
|
||||
define_buttons_->enable(&Options::gamepad_manager.getGamepad(Player::Id::PLAYER1));
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
case SDLK_2:
|
||||
define_buttons_->enable(&Options::gamepads.getGamepad(Player::Id::PLAYER2));
|
||||
define_buttons_->enable(&Options::gamepad_manager.getGamepad(Player::Id::PLAYER2));
|
||||
resetCounter();
|
||||
break;
|
||||
|
||||
@@ -262,14 +262,14 @@ auto Title::shouldSkipInputCheck() const -> bool {
|
||||
}
|
||||
|
||||
void Title::processControllerInputs() {
|
||||
for (const auto& controller : Options::gamepads) {
|
||||
for (const auto& controller : Options::gamepad_manager) {
|
||||
if (isStartButtonPressed(&controller)) {
|
||||
handleStartButtonPress(&controller);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto Title::isStartButtonPressed(const Options::Gamepad *controller) -> bool {
|
||||
auto Title::isStartButtonPressed(const Options::Gamepad* controller) -> bool {
|
||||
return Input::get()->checkAction(
|
||||
Input::Action::START,
|
||||
Input::DO_NOT_ALLOW_REPEAT,
|
||||
@@ -277,7 +277,7 @@ auto Title::isStartButtonPressed(const Options::Gamepad *controller) -> bool {
|
||||
controller->instance);
|
||||
}
|
||||
|
||||
void Title::handleStartButtonPress(const Options::Gamepad *controller) {
|
||||
void Title::handleStartButtonPress(const Options::Gamepad* controller) {
|
||||
if (!canProcessStartButton()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user