Patch: minor bug in SDL joystick polling
Posted: Sat Mar 25, 2006 11:26 am
The SDL joystick code for flushing joystick state 'joy_flush()' is slightly buggy and doesn't cover the entire button vector.
The result is JS with 'always on' buttons (e.g. the 3-position switches on Saitek)
can't be correctly used as the current switch state is never reset.
Patch to fix (relative to 1.5.179)
307c307
< for (i = 0; i < Joystick.n_buttons; i++) {
---
> for (i = 0; i < MAX_JOYSTICKS * JOY_MAX_BUTTONS; i++) {
cheers,
Andrew
The result is JS with 'always on' buttons (e.g. the 3-position switches on Saitek)
can't be correctly used as the current switch state is never reset.
Patch to fix (relative to 1.5.179)
307c307
< for (i = 0; i < Joystick.n_buttons; i++) {
---
> for (i = 0; i < MAX_JOYSTICKS * JOY_MAX_BUTTONS; i++) {
cheers,
Andrew