diff options
author | german77 <juangerman-13@hotmail.com> | 2021-11-01 21:17:53 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:26 +0100 |
commit | 77fa4d4bf60526826ef8b53ee3870f7d2a761976 (patch) | |
tree | 3c6c07d535bd912ed085be9b826103a6eabe718f /src/input_common/drivers | |
parent | settings: Fix Debug controller type options (diff) | |
download | yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.gz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.bz2 yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.lz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.xz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.zst yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/drivers/keyboard.cpp | 6 | ||||
-rw-r--r-- | src/input_common/drivers/keyboard.h | 7 | ||||
-rw-r--r-- | src/input_common/drivers/mouse.cpp | 5 | ||||
-rw-r--r-- | src/input_common/drivers/mouse.h | 5 | ||||
-rw-r--r-- | src/input_common/drivers/touch_screen.cpp | 6 | ||||
-rw-r--r-- | src/input_common/drivers/touch_screen.h | 8 |
6 files changed, 18 insertions, 19 deletions
diff --git a/src/input_common/drivers/keyboard.cpp b/src/input_common/drivers/keyboard.cpp index 85a781a30..549704e89 100644 --- a/src/input_common/drivers/keyboard.cpp +++ b/src/input_common/drivers/keyboard.cpp @@ -7,6 +7,12 @@ namespace InputCommon { +constexpr PadIdentifier identifier = { + .guid = Common::UUID{Common::INVALID_UUID}, + .port = 0, + .pad = 0, +}; + Keyboard::Keyboard(const std::string& input_engine_) : InputEngine(input_engine_) { PreSetController(identifier); } diff --git a/src/input_common/drivers/keyboard.h b/src/input_common/drivers/keyboard.h index 58df15050..46fe78576 100644 --- a/src/input_common/drivers/keyboard.h +++ b/src/input_common/drivers/keyboard.h @@ -32,13 +32,6 @@ public: /// Used for automapping features std::vector<Common::ParamPackage> GetInputDevices() const override; - -private: - const PadIdentifier identifier = { - .guid = Common::UUID{Common::INVALID_UUID}, - .port = 0, - .pad = 0, - }; }; } // namespace InputCommon diff --git a/src/input_common/drivers/mouse.cpp b/src/input_common/drivers/mouse.cpp index 1c32b54be..afa92b458 100644 --- a/src/input_common/drivers/mouse.cpp +++ b/src/input_common/drivers/mouse.cpp @@ -14,6 +14,11 @@ namespace InputCommon { constexpr int touch_axis_x = 10; constexpr int touch_axis_y = 11; +constexpr PadIdentifier identifier = { + .guid = Common::UUID{Common::INVALID_UUID}, + .port = 0, + .pad = 0, +}; Mouse::Mouse(const std::string input_engine_) : InputEngine(input_engine_) { PreSetController(identifier); diff --git a/src/input_common/drivers/mouse.h b/src/input_common/drivers/mouse.h index cf0918409..1be362b94 100644 --- a/src/input_common/drivers/mouse.h +++ b/src/input_common/drivers/mouse.h @@ -62,11 +62,6 @@ private: void UpdateThread(std::stop_token stop_token); void StopPanning(); - const PadIdentifier identifier = { - .guid = Common::UUID{Common::INVALID_UUID}, - .port = 0, - .pad = 0, - }; Common::Vec2<int> mouse_origin; Common::Vec2<int> last_mouse_position; Common::Vec2<float> last_mouse_change; diff --git a/src/input_common/drivers/touch_screen.cpp b/src/input_common/drivers/touch_screen.cpp index e13835e9f..377c9ee2b 100644 --- a/src/input_common/drivers/touch_screen.cpp +++ b/src/input_common/drivers/touch_screen.cpp @@ -7,6 +7,12 @@ namespace InputCommon { +constexpr PadIdentifier identifier = { + .guid = Common::UUID{Common::INVALID_UUID}, + .port = 0, + .pad = 0, +}; + TouchScreen::TouchScreen(const std::string input_engine_) : InputEngine(input_engine_) { PreSetController(identifier); } diff --git a/src/input_common/drivers/touch_screen.h b/src/input_common/drivers/touch_screen.h index d297d253c..0f4cd0e7a 100644 --- a/src/input_common/drivers/touch_screen.h +++ b/src/input_common/drivers/touch_screen.h @@ -37,14 +37,8 @@ public: */ void TouchReleased(std::size_t finger); + /// Resets all inputs to their initial value void ReleaseAllTouch(); - -private: - const PadIdentifier identifier = { - .guid = Common::UUID{Common::INVALID_UUID}, - .port = 0, - .pad = 0, - }; }; } // namespace InputCommon |