All of the gamepads in AntiMicroX show wrong number of buttons.
This is caused by hardcoded value of button number for every device recognized as GamePad.
int GameController::getNumberRawButtons() { return SDL_CONTROLLER_BUTTON_MAX; }
Fixing attempt #555
int GameController::getNumberRawButtons() { return SDL_JoystickNumButtons(m_device); }
caused sudden crashes for some controllers #579 caused smaller than expected number of buttons (and lack of proper handling of this case)
At first glance, it seems, that SDL API SDL_JoystickNumButtons
is broken, because in some cases it shows invalid number of buttons.
Button numbers for gamepad: PS5 Controller SDL_JoystickNumButtons: 13
SDL version: 2.24.0
Example log from this kind of situation:
antimicrox.log
Reported to SDL libsdl-org/SDL#6442
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too