Fixed buttons mapping
This commit is contained in:
parent
44f36ceee9
commit
0ed0d2407c
1 changed files with 6 additions and 6 deletions
12
src/main.c
12
src/main.c
|
@ -229,7 +229,7 @@ static void send_hid_report(uint8_t report_id, struct psx_report *rep)
|
|||
};
|
||||
|
||||
if ((rep->sw[0] & PSX_SW0_SELECT)==0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_17;
|
||||
report.buttons |= GAMEPAD_BUTTON_8;
|
||||
}
|
||||
if ((rep->sw[0] & PSX_SW0_L3) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_L3;
|
||||
|
@ -238,7 +238,7 @@ static void send_hid_report(uint8_t report_id, struct psx_report *rep)
|
|||
report.buttons |= GAMEPAD_BUTTON_R3;
|
||||
}
|
||||
if ((rep->sw[0] & PSX_SW0_START) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_18;
|
||||
report.buttons |= GAMEPAD_BUTTON_9;
|
||||
}
|
||||
if ((rep->sw[0] & PSX_SW0_UP) == 0) {
|
||||
report.buttons |= GAMEPAD_DPAD_UP;
|
||||
|
@ -266,14 +266,14 @@ static void send_hid_report(uint8_t report_id, struct psx_report *rep)
|
|||
report.buttons |= GAMEPAD_BUTTON_R1;
|
||||
}
|
||||
if ((rep->sw[1] & PSX_SW1_TRIANGLE) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_2;
|
||||
}
|
||||
if ((rep->sw[1] & PSX_SW1_CIRCLE) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_3;
|
||||
}
|
||||
if ((rep->sw[1] & PSX_SW1_SQUARE) == 0) {
|
||||
if ((rep->sw[1] & PSX_SW1_CIRCLE) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_1;
|
||||
}
|
||||
if ((rep->sw[1] & PSX_SW1_SQUARE) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_2;
|
||||
}
|
||||
if ((rep->sw[1] & PSX_SW1_CROSS) == 0) {
|
||||
report.buttons |= GAMEPAD_BUTTON_0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue