diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-01-10 21:26:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 21:26:36 +0100 |
commit | 9f974ea8189c255ff3ab8fcad6ae310a5e50d296 (patch) | |
tree | 865bd949208a7dad04a4eb45e9f353588df589d6 /src/input_common/drivers/tas_input.cpp | |
parent | macOS: Make Yuzu show up in the Launchpad Games folder (#9594) (diff) | |
parent | TAS: Show all script lengths for multiplayer (diff) | |
download | yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.tar yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.tar.gz yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.tar.bz2 yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.tar.lz yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.tar.xz yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.tar.zst yuzu-9f974ea8189c255ff3ab8fcad6ae310a5e50d296.zip |
Diffstat (limited to '')
-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) { }; } -std::tuple<TasState, size_t, size_t> Tas::GetStatus() const { +std::tuple<TasState, size_t, std::array<size_t, PLAYER_NUMBER>> Tas::GetStatus() const { TasState state; + std::array<size_t, PLAYER_NUMBER> lengths{0}; if (is_recording) { - return {TasState::Recording, 0, record_commands.size()}; + lengths[0] = record_commands.size(); + return {TasState::Recording, record_commands.size(), lengths}; } if (is_running) { @@ -168,7 +170,11 @@ std::tuple<TasState, size_t, size_t> Tas::GetStatus() const { state = TasState::Stopped; } - return {state, current_command, script_length}; + for (size_t i = 0; i < PLAYER_NUMBER; i++) { + lengths[i] = commands[i].size(); + } + + return {state, current_command, lengths}; } void Tas::UpdateThread() { |