Fix for dropped joystick events contributed by Simon <simon@mungewell.org>

In my system SDL2 is dropping a chunk of joystick events, which result in
a 'stuck brake/accelerator' whilst playing a racing simulator. This
basically means SDL2 is unsuitable for use at this point...

The patch below detects this situation and forces a re-read of all
attached joystick axis - thus resync to the correct/current pedal
positions.
This commit is contained in:
Sam Lantinga 2013-02-11 16:45:24 -08:00
parent b73214bd02
commit 7b84e779ec
2 changed files with 61 additions and 0 deletions

View file

@ -50,4 +50,8 @@ struct joystick_hwdata
int used;
int coef[3];
} abs_correct[ABS_MAX];
int fresh;
};
/* vi: set ts=4 sw=4 expandtab: */