mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-19 09:48:14 +00:00
Added support for the 8Bitdo Zero GamePad
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user