Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that SDL reports any available controls for a joystick, otherwise mark it invalid and close it. When processing events for joysticks, check that each one is valid. Set initial value of controls to zero initially not after getting the initial state, previously we were getting the initial state and overwriting it with zeroes, defeating the purpose. Fix memory leak, `curval` array of controls not being cleared. Signed-off-by: Rafael Kitover <rkitover@gmail.com>
- Loading branch information
Showing
1 changed file
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters