From c3018fdc3b186c1da0d76aa7d2870623544187c1 Mon Sep 17 00:00:00 2001 From: TheConfuZzledDude Date: Thu, 22 Dec 2022 20:21:17 +0000 Subject: InputCommon/XInput2: Added an axis output for the scroll wheel --- Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h') diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h index b07f6325c7..3087a7a260 100644 --- a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h +++ b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h @@ -28,8 +28,8 @@ private: std::array keyboard; unsigned int buttons; Common::Vec2 cursor; - Common::Vec2 axis; - Common::Vec2 relative_mouse; + Common::Vec3 axis; + Common::Vec3 relative_mouse; }; class Key : public Input @@ -113,7 +113,7 @@ private: public: void UpdateInput() override; - KeyboardMouse(Window window, int opcode, int pointer_deviceid, int keyboard_deviceid); + KeyboardMouse(Window window, int opcode, int pointer_deviceid, int keyboard_deviceid, double scroll_increment); ~KeyboardMouse(); std::string GetName() const override; @@ -126,6 +126,7 @@ private: const int xi_opcode; const int pointer_deviceid; const int keyboard_deviceid; + const double scroll_increment; std::string name; }; } // namespace ciface::XInput2 -- cgit v1.2.3 From 288fa635f92760f71f638a5a411e63fafe9cb44e Mon Sep 17 00:00:00 2001 From: TheConfuZzledDude Date: Mon, 26 Dec 2022 17:27:48 +0000 Subject: InputCommon/XInput2: Changed axis value reading to be more correct --- Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h') diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h index 3087a7a260..ff2c787b1d 100644 --- a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h +++ b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h @@ -113,7 +113,8 @@ private: public: void UpdateInput() override; - KeyboardMouse(Window window, int opcode, int pointer_deviceid, int keyboard_deviceid, double scroll_increment); + KeyboardMouse(Window window, int opcode, int pointer_deviceid, int keyboard_deviceid, + double scroll_increment); ~KeyboardMouse(); std::string GetName() const override; -- cgit v1.2.3