diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-19 19:21:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 19:21:01 +0100 |
commit | bcbc25eeb3027445f55050baa9ecd09289141dad (patch) | |
tree | c3e93e0ca9dc41a492898520b5c8e7c28f1f7954 /src/input_common/helpers/touch_from_buttons.cpp | |
parent | Merge pull request #9260 from liamwhite/youre-in-big-trouble-now (diff) | |
parent | service: hid: Only overclock npad controllers (diff) | |
download | yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.tar yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.tar.gz yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.tar.bz2 yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.tar.lz yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.tar.xz yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.tar.zst yuzu-bcbc25eeb3027445f55050baa9ecd09289141dad.zip |
Diffstat (limited to 'src/input_common/helpers/touch_from_buttons.cpp')
-rw-r--r-- | src/input_common/helpers/touch_from_buttons.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/input_common/helpers/touch_from_buttons.cpp b/src/input_common/helpers/touch_from_buttons.cpp index da4a3dca5..003a38da5 100644 --- a/src/input_common/helpers/touch_from_buttons.cpp +++ b/src/input_common/helpers/touch_from_buttons.cpp @@ -10,8 +10,8 @@ namespace InputCommon { class TouchFromButtonDevice final : public Common::Input::InputDevice { public: using Button = std::unique_ptr<Common::Input::InputDevice>; - TouchFromButtonDevice(Button button_, int touch_id_, float x_, float y_) - : button(std::move(button_)), touch_id(touch_id_), x(x_), y(y_) { + TouchFromButtonDevice(Button button_, float x_, float y_) + : button(std::move(button_)), x(x_), y(y_) { last_button_value = false; button->SetCallback({ .on_change = @@ -34,7 +34,6 @@ public: .pressed = button_status, .x = {}, .y = {}, - .id = touch_id, }; status.x.properties = properties; status.y.properties = properties; @@ -62,7 +61,6 @@ public: private: Button button; bool last_button_value; - const int touch_id; const float x; const float y; const Common::Input::AnalogProperties properties{0.0f, 1.0f, 0.5f, 0.0f, false}; @@ -73,10 +71,9 @@ std::unique_ptr<Common::Input::InputDevice> TouchFromButton::Create( const std::string null_engine = Common::ParamPackage{{"engine", "null"}}.Serialize(); auto button = Common::Input::CreateDeviceFromString<Common::Input::InputDevice>( params.Get("button", null_engine)); - const auto touch_id = params.Get("touch_id", 0); const float x = params.Get("x", 0.0f) / 1280.0f; const float y = params.Get("y", 0.0f) / 720.0f; - return std::make_unique<TouchFromButtonDevice>(std::move(button), touch_id, x, y); + return std::make_unique<TouchFromButtonDevice>(std::move(button), x, y); } } // namespace InputCommon |