fix: sense mandos no comprovava ni el teclat

This commit is contained in:
2024-09-24 20:44:09 +02:00
parent 998b151c00
commit 2f152915ed

View File

@@ -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);