Added support for the 8Bitdo Zero GamePad

This commit is contained in:
Sam Lantinga 2017-01-20 08:13:23 -08:00
parent e8a0188c9f
commit 88fd1d721d
2 changed files with 6 additions and 0 deletions

View file

@ -126,12 +126,15 @@ SDL_JoystickAxesCenteredAtZero(SDL_Joystick *joystick)
Uint16 product;
} zero_centered_joysticks[] = {
{ 0x0e8f, 0x3013 }, /* HuiJia SNES USB adapter */
{ 0x05a0, 0x3232 }, /* 8Bitdo Zero Gamepad */
};
int i;
Uint16 vendor = SDL_JoystickGetVendor(joystick);
Uint16 product = SDL_JoystickGetProduct(joystick);
/*printf("JOYSTICK '%s' VID/PID 0x%.4x/0x%.4x AXES: %d\n", joystick->name, vendor, product, joystick->naxes);*/
if (joystick->naxes == 2) {
/* Assume D-pad or thumbstick style axes are centered at 0 */
return SDL_TRUE;