summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2021-04-01 01:05:00 -0400
committerGitHub <noreply@github.com>2021-04-01 01:05:00 -0400
commitce8e87c64b271b13a30fbc898b59427d28876a81 (patch)
tree969b78c3ba230a74bfc9d953427a65bfd4f50bed /Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
parent06439a2d40a06179633301e91ee85fa3059506fa (diff)
parent28e880efb628598090c715a7783a8dcbbbf18d50 (diff)
Merge pull request #8747 from iwubcode/map-freelook
Support controlling Free Look via input bindings (motion controls, gamepad, etc!)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
index a9442b6332..71681a3e10 100644
--- a/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
+++ b/Source/Core/InputCommon/ControllerInterface/Xlib/XInput2.h
@@ -30,6 +30,7 @@ private:
unsigned int buttons;
Common::Vec2 cursor;
Common::Vec2 axis;
+ Common::Vec2 relative_mouse;
};
class Key : public Input
@@ -91,6 +92,21 @@ private:
std::string name;
};
+ class RelativeMouse : public Input
+ {
+ public:
+ std::string GetName() const override { return name; }
+ bool IsDetectable() const override { return false; }
+ RelativeMouse(u8 index, bool positive, const float* axis);
+ ControlState GetState() const override;
+
+ private:
+ const float* m_axis;
+ const u8 m_index;
+ const bool m_positive;
+ std::string name;
+ };
+
private:
void SelectEventsForDevice(XIEventMask* mask, int deviceid);
void UpdateCursor();