diff options
Diffstat (limited to 'src/input_common/udp/udp.cpp')
| -rw-r--r-- | src/input_common/udp/udp.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/input_common/udp/udp.cpp b/src/input_common/udp/udp.cpp index 8c6ef1394..4b347e47e 100644 --- a/src/input_common/udp/udp.cpp +++ b/src/input_common/udp/udp.cpp | |||
| @@ -77,10 +77,11 @@ State::State() { | |||
| 77 | std::make_unique<Client>(status, Settings::values.udp_input_address, | 77 | std::make_unique<Client>(status, Settings::values.udp_input_address, |
| 78 | Settings::values.udp_input_port, Settings::values.udp_pad_index); | 78 | Settings::values.udp_input_port, Settings::values.udp_pad_index); |
| 79 | 79 | ||
| 80 | Input::RegisterFactory<Input::TouchDevice>("cemuhookudp", | 80 | motion_factory = std::make_shared<UDPMotionFactory>(status); |
| 81 | std::make_shared<UDPTouchFactory>(status)); | 81 | touch_factory = std::make_shared<UDPTouchFactory>(status); |
| 82 | Input::RegisterFactory<Input::MotionDevice>("cemuhookudp", | 82 | |
| 83 | std::make_shared<UDPMotionFactory>(status)); | 83 | Input::RegisterFactory<Input::MotionDevice>("cemuhookudp", motion_factory); |
| 84 | Input::RegisterFactory<Input::TouchDevice>("cemuhookudp", touch_factory); | ||
| 84 | } | 85 | } |
| 85 | 86 | ||
| 86 | State::~State() { | 87 | State::~State() { |
| @@ -88,6 +89,11 @@ State::~State() { | |||
| 88 | Input::UnregisterFactory<Input::MotionDevice>("cemuhookudp"); | 89 | Input::UnregisterFactory<Input::MotionDevice>("cemuhookudp"); |
| 89 | } | 90 | } |
| 90 | 91 | ||
| 92 | std::vector<Common::ParamPackage> State::GetInputDevices() const { | ||
| 93 | // TODO support binding udp devices | ||
| 94 | return {}; | ||
| 95 | } | ||
| 96 | |||
| 91 | void State::ReloadUDPClient() { | 97 | void State::ReloadUDPClient() { |
| 92 | client->ReloadSocket(Settings::values.udp_input_address, Settings::values.udp_input_port, | 98 | client->ReloadSocket(Settings::values.udp_input_address, Settings::values.udp_input_port, |
| 93 | Settings::values.udp_pad_index); | 99 | Settings::values.udp_pad_index); |