1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-12-18 10:37:53 +01:00

Fixed controller enum use for older SDL versions.

Issue #172.
This commit is contained in:
Muzychenko Andrey 2023-02-12 08:45:33 +03:00
parent 9454e11fd9
commit 831c3f49bf

View file

@ -569,7 +569,7 @@ std::string GameInput::GetShortInputDescription() const
keyName = std::to_string(Value); keyName = std::to_string(Value);
break; break;
case InputTypes::GameController: case InputTypes::GameController:
if (Value >= SDL_CONTROLLER_BUTTON_A && Value <= SDL_CONTROLLER_BUTTON_TOUCHPAD) if (Value >= SDL_CONTROLLER_BUTTON_A && Value < SDL_CONTROLLER_BUTTON_MAX)
keyName = controllerButtons[Value]; keyName = controllerButtons[Value];
else else
keyName = std::to_string(Value); keyName = std::to_string(Value);