Skip to content

Commit

Permalink
Older xpadneo versions have 12 buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
dkt01 committed Aug 22, 2022
1 parent 13c1bb5 commit cb89037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XBoxController/XBoxController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cb89037

Please sign in to comment.