Fixed controller enum use for older SDL versions.

Issue #172.
This commit is contained in:
Muzychenko Andrey committed 2023-02-12 08:45:33 +03:00
1 parent 9454e11fd9
commit 831c3f49bf
1 file changed
+1 -1
+1 -1
View File
@@ -569,7 +569,7 @@ std::string GameInput::GetShortInputDescription() const
keyName = std::to_string(Value);
break;
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];
else
keyName = std::to_string(Value);