mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Only change joystick->nbuttons for Joy-Cons, since they're the only ones that have these "paddles"
This commit is contained in:
parent
ee52624f95
commit
c287087fcc
@ -908,7 +908,12 @@ HIDAPI_DriverSwitch_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti
|
|||||||
SDL_GameControllerButtonReportingHintChanged, ctx);
|
SDL_GameControllerButtonReportingHintChanged, ctx);
|
||||||
|
|
||||||
/* Initialize the joystick capabilities */
|
/* Initialize the joystick capabilities */
|
||||||
|
if (ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConLeft ||
|
||||||
|
ctx->m_eControllerType == k_eSwitchDeviceInfoControllerType_JoyConRight) {
|
||||||
joystick->nbuttons = 20;
|
joystick->nbuttons = 20;
|
||||||
|
} else {
|
||||||
|
joystick->nbuttons = 16;
|
||||||
|
}
|
||||||
joystick->naxes = SDL_CONTROLLER_AXIS_MAX;
|
joystick->naxes = SDL_CONTROLLER_AXIS_MAX;
|
||||||
joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED;
|
joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user