diff options
| author | 2020-01-15 11:25:15 +0100 | |
|---|---|---|
| committer | 2020-01-15 11:25:15 +0100 | |
| commit | 635deb70d4c7b09749d9d7edb9515ede496f7f3e (patch) | |
| tree | 05b9fd2d60b606ca01f45fa9739b498235d6296a /src/core/frontend | |
| parent | Corrected directional states sensitivity (diff) | |
| download | yuzu-635deb70d4c7b09749d9d7edb9515ede496f7f3e.tar.gz yuzu-635deb70d4c7b09749d9d7edb9515ede496f7f3e.tar.xz yuzu-635deb70d4c7b09749d9d7edb9515ede496f7f3e.zip | |
Moved analog direction logic to sdl_impl
Diffstat (limited to 'src/core/frontend')
| -rw-r--r-- | src/core/frontend/input.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index 7c11d7546..2b098b7c6 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h | |||
| @@ -15,6 +15,13 @@ | |||
| 15 | 15 | ||
| 16 | namespace Input { | 16 | namespace Input { |
| 17 | 17 | ||
| 18 | enum class AnalogDirection : u8 { | ||
| 19 | RIGHT, | ||
| 20 | LEFT, | ||
| 21 | UP, | ||
| 22 | DOWN, | ||
| 23 | }; | ||
| 24 | |||
| 18 | /// An abstract class template for an input device (a button, an analog input, etc.). | 25 | /// An abstract class template for an input device (a button, an analog input, etc.). |
| 19 | template <typename StatusType> | 26 | template <typename StatusType> |
| 20 | class InputDevice { | 27 | class InputDevice { |
| @@ -23,6 +30,9 @@ public: | |||
| 23 | virtual StatusType GetStatus() const { | 30 | virtual StatusType GetStatus() const { |
| 24 | return {}; | 31 | return {}; |
| 25 | } | 32 | } |
| 33 | virtual bool GetAnalogDirectionStatus(AnalogDirection direction) const { | ||
| 34 | return {}; | ||
| 35 | } | ||
| 26 | }; | 36 | }; |
| 27 | 37 | ||
| 28 | /// An abstract class template for a factory that can create input devices. | 38 | /// An abstract class template for a factory that can create input devices. |