From 831c3f49bf6060bb8a1e53edc00139b47df37f2f Mon Sep 17 00:00:00 2001 From: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com> Date: Sun, 12 Feb 2023 08:45:33 +0300 Subject: [PATCH] Fixed controller enum use for older SDL versions. Issue #172. --- SpaceCadetPinball/options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SpaceCadetPinball/options.cpp b/SpaceCadetPinball/options.cpp index fae5a65..85f2c6a 100644 --- a/SpaceCadetPinball/options.cpp +++ b/SpaceCadetPinball/options.cpp @@ -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);