diff options
| author | 2022-09-09 20:54:01 -0700 | |
|---|---|---|
| committer | 2022-09-09 20:54:01 -0700 | |
| commit | a967c41fa07c39b47aa8401305dfa0c8a9478367 (patch) | |
| tree | 8e3b0077cf8bc7ae0acbca3459d5e43bb3b9cec4 /src/common/input.h | |
| parent | Merge pull request #8819 from liamwhite/cash-money (diff) | |
| parent | yuzu: input: fix invert symbol on axis and order options alphabetically (diff) | |
| download | yuzu-a967c41fa07c39b47aa8401305dfa0c8a9478367.tar.gz yuzu-a967c41fa07c39b47aa8401305dfa0c8a9478367.tar.xz yuzu-a967c41fa07c39b47aa8401305dfa0c8a9478367.zip | |
Merge pull request #8864 from german77/toggle_analog
input_common: Add support for analog toggle
Diffstat (limited to 'src/common/input.h')
| -rw-r--r-- | src/common/input.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/input.h b/src/common/input.h index 213aa2384..825b0d650 100644 --- a/src/common/input.h +++ b/src/common/input.h | |||
| @@ -102,6 +102,8 @@ struct AnalogProperties { | |||
| 102 | float offset{}; | 102 | float offset{}; |
| 103 | // Invert direction of the sensor data | 103 | // Invert direction of the sensor data |
| 104 | bool inverted{}; | 104 | bool inverted{}; |
| 105 | // Press once to activate, press again to release | ||
| 106 | bool toggle{}; | ||
| 105 | }; | 107 | }; |
| 106 | 108 | ||
| 107 | // Single analog sensor data | 109 | // Single analog sensor data |
| @@ -115,8 +117,11 @@ struct AnalogStatus { | |||
| 115 | struct ButtonStatus { | 117 | struct ButtonStatus { |
| 116 | Common::UUID uuid{}; | 118 | Common::UUID uuid{}; |
| 117 | bool value{}; | 119 | bool value{}; |
| 120 | // Invert value of the button | ||
| 118 | bool inverted{}; | 121 | bool inverted{}; |
| 122 | // Press once to activate, press again to release | ||
| 119 | bool toggle{}; | 123 | bool toggle{}; |
| 124 | // Internal lock for the toggle status | ||
| 120 | bool locked{}; | 125 | bool locked{}; |
| 121 | }; | 126 | }; |
| 122 | 127 | ||