mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 17:36:25 +00:00
Fixed querying device info on the MOBAPAD M073
The query packet needs to contain valid rumble data in order to be accepted by the controller. Fixes https://github.com/libsdl-org/SDL/issues/7788
This commit is contained in:
@@ -1250,6 +1250,10 @@ static SDL_bool HIDAPI_DriverSwitch_InitDevice(SDL_HIDAPI_Device *device)
|
|||||||
/* Find out whether or not we can send output reports */
|
/* Find out whether or not we can send output reports */
|
||||||
ctx->m_bInputOnly = SDL_IsJoystickNintendoSwitchProInputOnly(device->vendor_id, device->product_id);
|
ctx->m_bInputOnly = SDL_IsJoystickNintendoSwitchProInputOnly(device->vendor_id, device->product_id);
|
||||||
if (!ctx->m_bInputOnly) {
|
if (!ctx->m_bInputOnly) {
|
||||||
|
/* Initialize rumble data, important for reading device info on the MOBAPAD M073 */
|
||||||
|
SetNeutralRumble(&ctx->m_RumblePacket.rumbleData[0]);
|
||||||
|
SetNeutralRumble(&ctx->m_RumblePacket.rumbleData[1]);
|
||||||
|
|
||||||
if (!BReadDeviceInfo(ctx)) {
|
if (!BReadDeviceInfo(ctx)) {
|
||||||
SDL_LogDebug(SDL_LOG_CATEGORY_INPUT,
|
SDL_LogDebug(SDL_LOG_CATEGORY_INPUT,
|
||||||
"HIDAPI_DriverSwitch_InitDevice(): Couldn't read device info");
|
"HIDAPI_DriverSwitch_InitDevice(): Couldn't read device info");
|
||||||
|
Reference in New Issue
Block a user