mirror of https://github.com/libsdl-org/SDL
Re-enable full controller reports for Joy-Con controllers
When they are in simple report mode, the thumbstick gets turned into a digital hat, so let's use them in full report mode.
This commit is contained in:
parent
6619de8f24
commit
bf27269952
|
@ -773,6 +773,14 @@ static Uint8 GetDefaultInputMode(SDL_DriverSwitch_Context *ctx)
|
||||||
#if 0
|
#if 0
|
||||||
input_mode = k_eSwitchInputReportIDs_FullControllerState;
|
input_mode = k_eSwitchInputReportIDs_FullControllerState;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* However, Joy-Con controllers switch their thumbsticks into D-pad mode in simple mode,
|
||||||
|
* so let's enable full controller state for them.
|
||||||
|
*/
|
||||||
|
if (ctx->device->product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_LEFT ||
|
||||||
|
ctx->device->product_id == USB_PRODUCT_NINTENDO_SWITCH_JOYCON_RIGHT) {
|
||||||
|
input_mode = k_eSwitchInputReportIDs_FullControllerState;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return input_mode;
|
return input_mode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue