diff options
Diffstat (limited to 'src/input_common/drivers/tas_input.cpp')
| -rw-r--r-- | src/input_common/drivers/tas_input.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index 0e01fb0d9..1a38616b4 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | namespace InputCommon::TasInput { | 16 | namespace InputCommon::TasInput { |
| 17 | 17 | ||
| 18 | enum TasAxes : u8 { | 18 | enum class Tas::TasAxis : u8 { |
| 19 | StickX, | 19 | StickX, |
| 20 | StickY, | 20 | StickY, |
| 21 | SubstickX, | 21 | SubstickX, |
| @@ -205,10 +205,10 @@ void Tas::UpdateThread() { | |||
| 205 | const int button = static_cast<int>(i); | 205 | const int button = static_cast<int>(i); |
| 206 | SetButton(identifier, button, button_status); | 206 | SetButton(identifier, button, button_status); |
| 207 | } | 207 | } |
| 208 | SetAxis(identifier, TasAxes::StickX, command.l_axis.x); | 208 | SetTasAxis(identifier, TasAxis::StickX, command.l_axis.x); |
| 209 | SetAxis(identifier, TasAxes::StickY, command.l_axis.y); | 209 | SetTasAxis(identifier, TasAxis::StickY, command.l_axis.y); |
| 210 | SetAxis(identifier, TasAxes::SubstickX, command.r_axis.x); | 210 | SetTasAxis(identifier, TasAxis::SubstickX, command.r_axis.x); |
| 211 | SetAxis(identifier, TasAxes::SubstickY, command.r_axis.y); | 211 | SetTasAxis(identifier, TasAxis::SubstickY, command.r_axis.y); |
| 212 | } | 212 | } |
| 213 | } else { | 213 | } else { |
| 214 | is_running = Settings::values.tas_loop.GetValue(); | 214 | is_running = Settings::values.tas_loop.GetValue(); |
| @@ -267,6 +267,10 @@ std::string Tas::WriteCommandAxis(TasAnalog analog) const { | |||
| 267 | return fmt::format("{};{}", analog.x * 32767, analog.y * 32767); | 267 | return fmt::format("{};{}", analog.x * 32767, analog.y * 32767); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | void Tas::SetTasAxis(const PadIdentifier& identifier, TasAxis axis, f32 value) { | ||
| 271 | SetAxis(identifier, static_cast<int>(axis), value); | ||
| 272 | } | ||
| 273 | |||
| 270 | void Tas::StartStop() { | 274 | void Tas::StartStop() { |
| 271 | if (!Settings::values.tas_enable) { | 275 | if (!Settings::values.tas_enable) { |
| 272 | return; | 276 | return; |