mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-01 03:32:07 +00:00
cellPad: allow opening the home menu with ldd pads
Speculative
This commit is contained in:
parent
38c7cf474d
commit
c3e4b6da46
@ -52,6 +52,11 @@ enum Digital2Flags : u32
|
||||
CELL_PAD_CTRL_PS = 0x00000100, // Speculative
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CELL_PAD_CTRL_LDD_PS = 0x00000001
|
||||
};
|
||||
|
||||
enum DeviceCapability
|
||||
{
|
||||
CELL_PAD_CAPABILITY_PS3_CONFORMITY = 0x00000001, // PS3 Conformity Controller
|
||||
|
@ -422,21 +422,29 @@ void pad_thread::operator()()
|
||||
if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
|
||||
continue;
|
||||
|
||||
// Check if an LDD pad pressed the PS button (bit 0 of the first button)
|
||||
if (pad->ldd && !!(static_cast<be_t<u16>>(pad->ldd_data[sizeof(be_t<u32>)]) & CELL_PAD_CTRL_LDD_PS))
|
||||
{
|
||||
ps_button_pressed = true;
|
||||
break;
|
||||
}
|
||||
|
||||
for (const auto& button : pad->m_buttons)
|
||||
{
|
||||
if (button.m_offset == CELL_PAD_BTN_OFFSET_DIGITAL2 && button.m_outKeyCode == CELL_PAD_CTRL_PS && button.m_pressed)
|
||||
{
|
||||
// Make sure we call this function only once per button press
|
||||
if (!m_ps_button_pressed)
|
||||
{
|
||||
open_home_menu();
|
||||
}
|
||||
ps_button_pressed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure we call this function only once per button press
|
||||
if (ps_button_pressed && !m_ps_button_pressed)
|
||||
{
|
||||
open_home_menu();
|
||||
}
|
||||
|
||||
m_ps_button_pressed = ps_button_pressed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user