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

input: add made up CELL_PAD_CTRL_PS enum

And remove useless comment about 0x0 buttons. It's a bitmap, so 0x0 is literally useless.
This commit is contained in:
Megamouse 2021-11-15 22:16:32 +01:00
parent 26475f8f40
commit 56241838c0
4 changed files with 18 additions and 20 deletions

View File

@ -485,8 +485,7 @@ bool PadHandlerBase::bindPadToDevice(std::shared_ptr<Pad> pad, const std::string
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, mapping[button::r3], CELL_PAD_CTRL_R3);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, mapping[button::start], CELL_PAD_CTRL_START);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, mapping[button::select], CELL_PAD_CTRL_SELECT);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, mapping[button::ps], 0x100/*CELL_PAD_CTRL_PS*/);// TODO: PS button support
//pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, 0, 0x0); // Reserved (and currently not in use by rpcs3 at all)
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, mapping[button::ps], CELL_PAD_CTRL_PS);
pad->m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_X, mapping[button::ls_left], mapping[button::ls_right]);
pad->m_sticks.emplace_back(CELL_PAD_BTN_OFFSET_ANALOG_LEFT_Y, mapping[button::ls_down], mapping[button::ls_up]);

View File

@ -28,26 +28,27 @@ enum PortSettings
enum Digital1Flags
{
CELL_PAD_CTRL_LEFT = 0x00000080,
CELL_PAD_CTRL_DOWN = 0x00000040,
CELL_PAD_CTRL_RIGHT = 0x00000020,
CELL_PAD_CTRL_UP = 0x00000010,
CELL_PAD_CTRL_START = 0x00000008,
CELL_PAD_CTRL_R3 = 0x00000004,
CELL_PAD_CTRL_L3 = 0x00000002,
CELL_PAD_CTRL_SELECT = 0x00000001,
CELL_PAD_CTRL_L3 = 0x00000002,
CELL_PAD_CTRL_R3 = 0x00000004,
CELL_PAD_CTRL_START = 0x00000008,
CELL_PAD_CTRL_UP = 0x00000010,
CELL_PAD_CTRL_RIGHT = 0x00000020,
CELL_PAD_CTRL_DOWN = 0x00000040,
CELL_PAD_CTRL_LEFT = 0x00000080,
};
enum Digital2Flags
{
CELL_PAD_CTRL_SQUARE = 0x00000080,
CELL_PAD_CTRL_CROSS = 0x00000040,
CELL_PAD_CTRL_CIRCLE = 0x00000020,
CELL_PAD_CTRL_L2 = 0x00000001,
CELL_PAD_CTRL_R2 = 0x00000002,
CELL_PAD_CTRL_L1 = 0x00000004,
CELL_PAD_CTRL_R1 = 0x00000008,
CELL_PAD_CTRL_TRIANGLE = 0x00000010,
CELL_PAD_CTRL_R1 = 0x00000008,
CELL_PAD_CTRL_L1 = 0x00000004,
CELL_PAD_CTRL_R2 = 0x00000002,
CELL_PAD_CTRL_L2 = 0x00000001,
CELL_PAD_CTRL_CIRCLE = 0x00000020,
CELL_PAD_CTRL_CROSS = 0x00000040,
CELL_PAD_CTRL_SQUARE = 0x00000080,
CELL_PAD_CTRL_PS = 0x00000100, // Speculative
};
enum DeviceCapability

View File

@ -997,12 +997,11 @@ bool evdev_joystick_handler::bindPadToDevice(std::shared_ptr<Pad> pad, const std
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->select).code, CELL_PAD_CTRL_SELECT);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->l3).code, CELL_PAD_CTRL_L3);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->r3).code, CELL_PAD_CTRL_R3);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, evdevbutton(cfg->ps).code, 0x100/*CELL_PAD_CTRL_PS*/);// TODO: PS button support
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, evdevbutton(cfg->ps).code, CELL_PAD_CTRL_PS);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->up).code, CELL_PAD_CTRL_UP);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->down).code, CELL_PAD_CTRL_DOWN);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->left).code, CELL_PAD_CTRL_LEFT);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, evdevbutton(cfg->right).code, CELL_PAD_CTRL_RIGHT);
//pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, 0, 0x0); // Reserved (and currently not in use by rpcs3 at all)
m_dev->axis_left[0] = evdevbutton(cfg->ls_right);
m_dev->axis_left[1] = evdevbutton(cfg->ls_left);

View File

@ -784,8 +784,7 @@ bool keyboard_pad_handler::bindPadToDevice(std::shared_ptr<Pad> pad, const std::
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, find_key(cfg->r3), CELL_PAD_CTRL_R3);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, find_key(cfg->l3), CELL_PAD_CTRL_L3);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL1, find_key(cfg->select), CELL_PAD_CTRL_SELECT);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, find_key(cfg->ps), 0x100/*CELL_PAD_CTRL_PS*/);// TODO: PS button support
//pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, 0, 0x0); // Reserved (and currently not in use by rpcs3 at all)
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, find_key(cfg->ps), CELL_PAD_CTRL_PS);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, find_key(cfg->square), CELL_PAD_CTRL_SQUARE);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, find_key(cfg->cross), CELL_PAD_CTRL_CROSS);
pad->m_buttons.emplace_back(CELL_PAD_BTN_OFFSET_DIGITAL2, find_key(cfg->circle), CELL_PAD_CTRL_CIRCLE);