From cb890376d7a25c66dcbae1051bfaa2c02ee88590 Mon Sep 17 00:00:00 2001 From: dkt01 Date: Sun, 21 Aug 2022 19:42:04 -0500 Subject: [PATCH] Older xpadneo versions have 12 buttons --- src/XBoxController/XBoxController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XBoxController/XBoxController.cpp b/src/XBoxController/XBoxController.cpp index dc1294d..409cd8d 100644 --- a/src/XBoxController/XBoxController.cpp +++ b/src/XBoxController/XBoxController.cpp @@ -81,7 +81,7 @@ bool XBoxController::Initialize() { SDL_GameControllerEventState(SDL_ENABLE); m_pJoystick = candidateJoystick; return true; - } else if (num_axes == 7 && num_buttons == 15 && num_hats == 1) { + } else if (num_axes == 7 && (num_buttons == 15 || num_buttons == 12) && num_hats == 1) { std::cout << "Connected to new XBox Series controller\n"; SDL_GameControllerEventState(SDL_ENABLE); m_pJoystick = candidateJoystick;