From 2f152915ed92e20bf0404c37bd72399c50dda2d6 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Tue, 24 Sep 2024 20:44:09 +0200 Subject: [PATCH] fix: sense mandos no comprovava ni el teclat --- source/common/input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/input.cpp b/source/common/input.cpp index 0e231a8..275b980 100644 --- a/source/common/input.cpp +++ b/source/common/input.cpp @@ -83,7 +83,7 @@ void Input::bindGameControllerButton(int index, inputs_e inputTarget, inputs_e i // Comprueba si un input esta activo bool Input::checkInput(inputs_e input, bool repeat, int device, int index) { - if (!enabled || index >= numGamepads) + if (!enabled) { return false; } @@ -140,7 +140,7 @@ bool Input::checkInput(inputs_e input, bool repeat, int device, int index) } } - if (gameControllerFound()) + if (gameControllerFound() && index < numGamepads) if ((device == INPUT_USE_GAMECONTROLLER) || (device == INPUT_USE_ANY)) { successGameController = checkAxisInput(input, index);