diff options
Diffstat (limited to 'src/input_common/drivers/tas_input.cpp')
| -rw-r--r-- | src/input_common/drivers/tas_input.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index f3ade90da..f3cb14c56 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp | |||
| @@ -156,10 +156,12 @@ void Tas::RecordInput(u64 buttons, TasAnalog left_axis, TasAnalog right_axis) { | |||
| 156 | }; | 156 | }; |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | std::tuple<TasState, size_t, size_t> Tas::GetStatus() const { | 159 | std::tuple<TasState, size_t, std::array<size_t, PLAYER_NUMBER>> Tas::GetStatus() const { |
| 160 | TasState state; | 160 | TasState state; |
| 161 | std::array<size_t, PLAYER_NUMBER> lengths{0}; | ||
| 161 | if (is_recording) { | 162 | if (is_recording) { |
| 162 | return {TasState::Recording, 0, record_commands.size()}; | 163 | lengths[0] = record_commands.size(); |
| 164 | return {TasState::Recording, record_commands.size(), lengths}; | ||
| 163 | } | 165 | } |
| 164 | 166 | ||
| 165 | if (is_running) { | 167 | if (is_running) { |
| @@ -168,7 +170,11 @@ std::tuple<TasState, size_t, size_t> Tas::GetStatus() const { | |||
| 168 | state = TasState::Stopped; | 170 | state = TasState::Stopped; |
| 169 | } | 171 | } |
| 170 | 172 | ||
| 171 | return {state, current_command, script_length}; | 173 | for (size_t i = 0; i < PLAYER_NUMBER; i++) { |
| 174 | lengths[i] = commands[i].size(); | ||
| 175 | } | ||
| 176 | |||
| 177 | return {state, current_command, lengths}; | ||
| 172 | } | 178 | } |
| 173 | 179 | ||
| 174 | void Tas::UpdateThread() { | 180 | void Tas::UpdateThread() { |