1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

overlays: add R3, L3 and PS buttons

Unused at the moment
This commit is contained in:
Megamouse 2021-11-15 22:20:15 +01:00
parent 56241838c0
commit 44b42f68fd
2 changed files with 29 additions and 4 deletions

View File

@ -86,7 +86,7 @@ namespace rsx
}
int pad_index = -1;
for (const auto &pad : handler->GetPads())
for (const auto& pad : handler->GetPads())
{
if (exit)
break;
@ -97,7 +97,18 @@ namespace rsx
continue;
}
for (auto &button : pad->m_buttons)
if (!pad)
{
rsx_log.fatal("Pad %d is nullptr", pad_index);
continue;
}
if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
{
continue;
}
for (const Button& button : pad->m_buttons)
{
u8 button_id = pad_button::pad_button_max_enum;
if (button.m_offset == CELL_PAD_BTN_OFFSET_DIGITAL1)
@ -116,13 +127,20 @@ namespace rsx
case CELL_PAD_CTRL_UP:
button_id = pad_button::dpad_up;
break;
case CELL_PAD_CTRL_L3:
button_id = pad_button::L3;
break;
case CELL_PAD_CTRL_R3:
button_id = pad_button::R3;
break;
case CELL_PAD_CTRL_SELECT:
button_id = pad_button::select;
break;
case CELL_PAD_CTRL_START:
button_id = pad_button::start;
break;
default: break;
default:
break;
}
}
else if (button.m_offset == CELL_PAD_BTN_OFFSET_DIGITAL2)
@ -153,7 +171,11 @@ namespace rsx
case CELL_PAD_CTRL_R2:
button_id = pad_button::R2;
break;
default: break;
case CELL_PAD_CTRL_PS:
button_id = pad_button::ps;
break;
default:
break;
}
}

View File

@ -56,6 +56,7 @@ namespace rsx
dpad_right,
select,
start,
ps,
triangle,
circle,
square,
@ -64,6 +65,8 @@ namespace rsx
R1,
L2,
R2,
L3,
R3,
pad_button_max_enum
};