diff options
| author | 2021-12-13 10:41:30 -0500 | |
|---|---|---|
| committer | 2021-12-13 10:41:32 -0500 | |
| commit | c126b0718ca4ffff463c4462ca38f61019df4acf (patch) | |
| tree | 5c1d3f7839643b3e43efab520c683bb5a9ea4815 /src/input_common/drivers/tas_input.h | |
| parent | Merge pull request #7574 from v1993/patch-1 (diff) | |
| download | yuzu-c126b0718ca4ffff463c4462ca38f61019df4acf.tar.gz yuzu-c126b0718ca4ffff463c4462ca38f61019df4acf.tar.xz yuzu-c126b0718ca4ffff463c4462ca38f61019df4acf.zip | |
tas_input: Make TasAxes enum an enum class
Prevents these values from potentially clashing with anything in other
headers.
Diffstat (limited to 'src/input_common/drivers/tas_input.h')
| -rw-r--r-- | src/input_common/drivers/tas_input.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_common/drivers/tas_input.h b/src/input_common/drivers/tas_input.h index c95a130fc..c44c39da9 100644 --- a/src/input_common/drivers/tas_input.h +++ b/src/input_common/drivers/tas_input.h | |||
| @@ -128,6 +128,8 @@ public: | |||
| 128 | std::tuple<TasState, size_t, size_t> GetStatus() const; | 128 | std::tuple<TasState, size_t, size_t> GetStatus() const; |
| 129 | 129 | ||
| 130 | private: | 130 | private: |
| 131 | enum class TasAxis : u8; | ||
| 132 | |||
| 131 | struct TASCommand { | 133 | struct TASCommand { |
| 132 | u64 buttons{}; | 134 | u64 buttons{}; |
| 133 | TasAnalog l_axis{}; | 135 | TasAnalog l_axis{}; |
| @@ -182,6 +184,9 @@ private: | |||
| 182 | */ | 184 | */ |
| 183 | std::string WriteCommandAxis(TasAnalog data) const; | 185 | std::string WriteCommandAxis(TasAnalog data) const; |
| 184 | 186 | ||
| 187 | /// Sets an axis for a particular pad to the given value. | ||
| 188 | void SetTasAxis(const PadIdentifier& identifier, TasAxis axis, f32 value); | ||
| 189 | |||
| 185 | size_t script_length{0}; | 190 | size_t script_length{0}; |
| 186 | bool is_recording{false}; | 191 | bool is_recording{false}; |
| 187 | bool is_running{false}; | 192 | bool is_running{false}; |