Implemented Linux joystick blacklist

Based on https://raw.githubusercontent.com/denilsonsa/udev-joystick-blacklist/master/generate_rules.py

This fixes a few devices that are not actually joysticks showing up as such in SDL
This commit is contained in:
Sam Lantinga 2017-04-06 06:30:43 -07:00
parent a4dbf56574
commit 1eb92f6342
3 changed files with 105 additions and 1 deletions

View file

@ -68,6 +68,9 @@ struct _SDL_Joystick
struct _SDL_Joystick *next; /* pointer to next joystick we have allocated */
};
/* Macro to combine a USB vendor ID and product ID into a single Uint32 value */
#define MAKE_VIDPID(VID, PID) (((Uint32)(VID))<<16|(PID))
/* Function to scan the system for joysticks.
* Joystick 0 should be the system default joystick.
* This function should return the number of available joysticks, or -1