Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS3/DS4/DualSense: enumerate devices periodically #9194

Merged
merged 11 commits into from Feb 22, 2021
1 change: 1 addition & 0 deletions rpcs3/CMakeLists.txt
Expand Up @@ -60,6 +60,7 @@ set(RPCS3_SRC
Input/ds4_pad_handler.cpp
Input/dualsense_pad_handler.cpp
Input/evdev_joystick_handler.cpp
Input/hid_pad_handler.cpp
Input/keyboard_pad_handler.cpp
Input/mm_joystick_handler.cpp
Input/pad_thread.cpp
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/Modules/cellPad.cpp
Expand Up @@ -85,7 +85,7 @@ error_code cellPadEnd()
return CELL_OK;
}

void clear_pad_buffer(const std::shared_ptr<Pad> pad)
void clear_pad_buffer(const std::shared_ptr<Pad>& pad)
{
if (!pad)
return;
Expand Down Expand Up @@ -159,7 +159,6 @@ error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
return CELL_PAD_ERROR_NO_DEVICE;

const auto pad = pads[port_no];
const auto setting = config->port_setting[port_no];

if (!(pad->m_port_status & CELL_PAD_STATUS_CONNECTED))
return CELL_PAD_ERROR_NO_DEVICE;
Expand All @@ -172,6 +171,7 @@ error_code cellPadGetData(u32 port_no, vm::ptr<CellPadData> data)
return CELL_OK;
}

const auto setting = config->port_setting[port_no];
bool btnChanged = false;

if (rinfo.ignore_input)
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Io/PadHandler.h
Expand Up @@ -12,8 +12,9 @@
#include <memory>
#include <unordered_map>

struct PadDevice
class PadDevice
{
public:
pad_config* config{ nullptr };
};

Expand Down