diff options
| author | 2020-07-22 10:39:53 -0400 | |
|---|---|---|
| committer | 2020-08-26 02:32:32 -0400 | |
| commit | f0fac0c7fb6f7dd9fe81747b3369767c8c9e7d01 (patch) | |
| tree | 4438688a9b9b4bc015985f2df1a731de57fe50db /src/input_common/udp/udp.cpp | |
| parent | Merge pull request #4582 from lioncash/xbyak (diff) | |
| download | yuzu-f0fac0c7fb6f7dd9fe81747b3369767c8c9e7d01.tar.gz yuzu-f0fac0c7fb6f7dd9fe81747b3369767c8c9e7d01.tar.xz yuzu-f0fac0c7fb6f7dd9fe81747b3369767c8c9e7d01.zip | |
Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
Diffstat (limited to '')
| -rw-r--r-- | src/input_common/udp/udp.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/input_common/udp/udp.cpp b/src/input_common/udp/udp.cpp index 8c6ef1394..60cf47123 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,12 @@ 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() { | ||
| 93 | std::vector<Common::ParamPackage> devices = {}; | ||
| 94 | // TODO support binding udp devices | ||
| 95 | return devices; | ||
| 96 | } | ||
| 97 | |||
| 91 | void State::ReloadUDPClient() { | 98 | void State::ReloadUDPClient() { |
| 92 | client->ReloadSocket(Settings::values.udp_input_address, Settings::values.udp_input_port, | 99 | client->ReloadSocket(Settings::values.udp_input_address, Settings::values.udp_input_port, |
| 93 | Settings::values.udp_pad_index); | 100 | Settings::values.udp_pad_index); |