diff options
author | wwylele <wwylele@gmail.com> | 2017-01-20 23:58:03 +0200 |
---|---|---|
committer | wwylele <wwylele@gmail.com> | 2017-03-01 23:30:57 +0200 |
commit | 70420272ca63425b52844632c6be3d3691446468 (patch) | |
tree | 193f709dcdeb8db5e978e59afa87cc0e444aa4e8 /src/core/frontend/input.h | |
parent | 1d1329af23221be31c244889609415e0fb0b2641 (diff) |
HID: use AnalogDevice
Diffstat (limited to 'src/core/frontend/input.h')
-rw-r--r-- | src/core/frontend/input.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index 63e64ac67..0a5713dc0 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h @@ -100,4 +100,11 @@ std::unique_ptr<InputDeviceType> CreateDevice(const std::string& params) { */ using ButtonDevice = InputDevice<bool>; +/** + * An analog device is an input device that returns a tuple of x and y coordinates as status. The + * coordinates are within the unit circle. x+ is defined as right direction, and y+ is defined as up + * direction + */ +using AnalogDevice = InputDevice<std::tuple<float, float>>; + } // namespace Input |