InputCommon / DolphinQt / Core: Add a "RelativeMouse" input which provides the raw delta mouse input

Co-authored-by: Jordan Woyak <jordan.woyak@gmail.com>
This commit is contained in:
iwubcode
2020-04-20 23:16:07 -05:00
parent 679d51c289
commit db4b4e40cb
10 changed files with 165 additions and 5 deletions

View File

@ -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();