Wii/Wii U: Fix 3 USB controllers. See #7015 (#15938)

Fixes commit a4b934b which did not update all array indices.
This commit is contained in:
revvv 2023-11-22 17:49:12 +01:00 committed by GitHub
parent c2f32a434d
commit f188b7a824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -79,7 +79,7 @@ static int16_t hidpad_nesusb_get_axis(void *data, unsigned axis)
if (!device || axis >= 2)
return 0;
val = device->data[4 + axis];
val = device->data[3 + axis];
val = (val << 8) - 0x8000;
if (abs(val) > 0x1000)

View File

@ -118,9 +118,9 @@ static int16_t hidpad_retrode_get_axis(void *pad_data, unsigned axis)
return 0;
if (pad->datatype == RETRODE_TYPE_PAD)
val = pad->data[2 + axis];
val = pad->data[1 + axis];
else
val = device->pad_data[0].data[2 + axis];
val = device->pad_data[0].data[1 + axis];
/* map Retrode values to a known gamepad (VID=0x0079, PID=0x0011) */
if (val == 0x9C)

View File

@ -80,7 +80,7 @@ static int16_t hidpad_snesusb_get_axis(void *data, unsigned axis)
if (!device || axis >= 2)
return 0;
val = device->data[1 + axis];
val = device->data[axis];
val = (val << 8) - 0x8000;
if (abs(val) > 0x1000)