summaryrefslogtreecommitdiffstats
path: root/src/input_common/tas/tas_input.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-06-27 21:02:38 +0200
committerMonsterDruide1 <5958456@gmail.com>2021-09-18 23:22:42 +0200
commite6c4bf52f0eb2c9c78e983ffbc667891463d3253 (patch)
treed01a5189842a1c210b98588cb2b38ad89a11a322 /src/input_common/tas/tas_input.h
parentinput_common/tas: overwrite file dialog (diff)
downloadyuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar.gz
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar.bz2
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar.lz
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar.xz
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar.zst
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.zip
Diffstat (limited to 'src/input_common/tas/tas_input.h')
-rw-r--r--src/input_common/tas/tas_input.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/input_common/tas/tas_input.h b/src/input_common/tas/tas_input.h
index e0462e858..e1f351251 100644
--- a/src/input_common/tas/tas_input.h
+++ b/src/input_common/tas/tas_input.h
@@ -7,6 +7,7 @@
#include <array>
#include "common/common_types.h"
+#include "common/settings_input.h"
#include "core/frontend/input.h"
#include "input_common/main.h"
@@ -91,7 +92,7 @@ private:
};
void LoadTasFiles();
void LoadTasFile(size_t player_index);
- void WriteTasFile(std::string file_name);
+ void WriteTasFile(std::u8string file_name);
TasAnalog ReadCommandAxis(const std::string& line) const;
u32 ReadCommandButtons(const std::string& line) const;
std::string WriteCommandButtons(u32 data) const;
@@ -105,6 +106,9 @@ private:
std::string DebugInputs(const std::array<TasData, PLAYER_NUMBER>& arr) const;
std::string ButtonsToString(u32 button) const;
+ void SwapToTasController();
+ void SwapToStoredController();
+
size_t script_length{0};
std::array<TasData, PLAYER_NUMBER> tas_data;
bool is_recording{false};
@@ -114,5 +118,8 @@ private:
std::vector<TASCommand> record_commands{};
size_t current_command{0};
TASCommand last_input{}; // only used for recording
+
+ // Old settings for swapping controllers
+ std::array<Settings::PlayerInput, 10> player_mappings;
};
} // namespace TasInput