summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/tas_input.cpp
diff options
context:
space:
mode:
authorMonsterDruide1 <5958456@gmail.com>2022-01-21 19:21:47 +0100
committerMonsterDruide1 <5958456@gmail.com>2023-01-07 21:15:37 +0100
commit115bf204484d5ac058e7edaf5139974b22aa6f7e (patch)
treebe57fd8bcdb8dbcdce0ef7aec9d95d92ebabc402 /src/input_common/drivers/tas_input.cpp
parentMerge pull request #9559 from FernandoS27/cached-writes (diff)
downloadyuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.tar
yuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.tar.gz
yuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.tar.bz2
yuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.tar.lz
yuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.tar.xz
yuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.tar.zst
yuzu-115bf204484d5ac058e7edaf5139974b22aa6f7e.zip
Diffstat (limited to 'src/input_common/drivers/tas_input.cpp')
-rw-r--r--src/input_common/drivers/tas_input.cpp12
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() {