mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Fixed mis-detecting the share button on the Xbox controller over NDIS
This commit is contained in:
@@ -653,6 +653,9 @@ static void HIDAPI_DriverXboxOne_HandleStatePacket(SDL_Joystick *joystick, SDL_D
|
|||||||
Sint16 axis;
|
Sint16 axis;
|
||||||
Uint64 timestamp = SDL_GetTicksNS();
|
Uint64 timestamp = SDL_GetTicksNS();
|
||||||
|
|
||||||
|
/* Some controllers have larger packets over NDIS, but the real size is in data[3] */
|
||||||
|
size = SDL_min(data[3], size);
|
||||||
|
|
||||||
/* Enable paddles on the Xbox Elite controller when connected over USB */
|
/* Enable paddles on the Xbox Elite controller when connected over USB */
|
||||||
if (ctx->has_paddles && !ctx->has_unmapped_state && size == 50) {
|
if (ctx->has_paddles && !ctx->has_unmapped_state && size == 50) {
|
||||||
Uint8 packet[] = { 0x4d, 0x00, 0x00, 0x02, 0x07, 0x00 };
|
Uint8 packet[] = { 0x4d, 0x00, 0x00, 0x02, 0x07, 0x00 };
|
||||||
|
Reference in New Issue
Block a user