diff options
Diffstat (limited to 'src/input_common/udp/udp.cpp')
| -rw-r--r-- | src/input_common/udp/udp.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input_common/udp/udp.cpp b/src/input_common/udp/udp.cpp index a80f38614..ca99cc22f 100644 --- a/src/input_common/udp/udp.cpp +++ b/src/input_common/udp/udp.cpp | |||
| @@ -2,7 +2,9 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | 5 | #include <mutex> |
| 6 | #include <tuple> | ||
| 7 | |||
| 6 | #include "common/param_package.h" | 8 | #include "common/param_package.h" |
| 7 | #include "core/frontend/input.h" | 9 | #include "core/frontend/input.h" |
| 8 | #include "core/settings.h" | 10 | #include "core/settings.h" |
| @@ -14,7 +16,7 @@ namespace InputCommon::CemuhookUDP { | |||
| 14 | class UDPTouchDevice final : public Input::TouchDevice { | 16 | class UDPTouchDevice final : public Input::TouchDevice { |
| 15 | public: | 17 | public: |
| 16 | explicit UDPTouchDevice(std::shared_ptr<DeviceStatus> status_) : status(std::move(status_)) {} | 18 | explicit UDPTouchDevice(std::shared_ptr<DeviceStatus> status_) : status(std::move(status_)) {} |
| 17 | std::tuple<float, float, bool> GetStatus() const { | 19 | std::tuple<float, float, bool> GetStatus() const override { |
| 18 | std::lock_guard guard(status->update_mutex); | 20 | std::lock_guard guard(status->update_mutex); |
| 19 | return status->touch_status; | 21 | return status->touch_status; |
| 20 | } | 22 | } |
| @@ -26,7 +28,7 @@ private: | |||
| 26 | class UDPMotionDevice final : public Input::MotionDevice { | 28 | class UDPMotionDevice final : public Input::MotionDevice { |
| 27 | public: | 29 | public: |
| 28 | explicit UDPMotionDevice(std::shared_ptr<DeviceStatus> status_) : status(std::move(status_)) {} | 30 | explicit UDPMotionDevice(std::shared_ptr<DeviceStatus> status_) : status(std::move(status_)) {} |
| 29 | std::tuple<Common::Vec3<float>, Common::Vec3<float>> GetStatus() const { | 31 | std::tuple<Common::Vec3<float>, Common::Vec3<float>> GetStatus() const override { |
| 30 | std::lock_guard guard(status->update_mutex); | 32 | std::lock_guard guard(status->update_mutex); |
| 31 | return status->motion_status; | 33 | return status->motion_status; |
| 32 | } | 34 | } |