mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Fixes commit a4b934b
which did not update all array indices.
This commit is contained in:
parent
c2f32a434d
commit
f188b7a824
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user