summaryrefslogtreecommitdiff
path: root/src/input_common/tas/tas_input.h
diff options
context:
space:
mode:
authorGravatar german772021-06-27 14:02:38 -0500
committerGravatar MonsterDruide12021-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.gz
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.tar.xz
yuzu-e6c4bf52f0eb2c9c78e983ffbc667891463d3253.zip
input_common/tas: Add swap controller
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 @@
7#include <array> 7#include <array>
8 8
9#include "common/common_types.h" 9#include "common/common_types.h"
10#include "common/settings_input.h"
10#include "core/frontend/input.h" 11#include "core/frontend/input.h"
11#include "input_common/main.h" 12#include "input_common/main.h"
12 13
@@ -91,7 +92,7 @@ private:
91 }; 92 };
92 void LoadTasFiles(); 93 void LoadTasFiles();
93 void LoadTasFile(size_t player_index); 94 void LoadTasFile(size_t player_index);
94 void WriteTasFile(std::string file_name); 95 void WriteTasFile(std::u8string file_name);
95 TasAnalog ReadCommandAxis(const std::string& line) const; 96 TasAnalog ReadCommandAxis(const std::string& line) const;
96 u32 ReadCommandButtons(const std::string& line) const; 97 u32 ReadCommandButtons(const std::string& line) const;
97 std::string WriteCommandButtons(u32 data) const; 98 std::string WriteCommandButtons(u32 data) const;
@@ -105,6 +106,9 @@ private:
105 std::string DebugInputs(const std::array<TasData, PLAYER_NUMBER>& arr) const; 106 std::string DebugInputs(const std::array<TasData, PLAYER_NUMBER>& arr) const;
106 std::string ButtonsToString(u32 button) const; 107 std::string ButtonsToString(u32 button) const;
107 108
109 void SwapToTasController();
110 void SwapToStoredController();
111
108 size_t script_length{0}; 112 size_t script_length{0};
109 std::array<TasData, PLAYER_NUMBER> tas_data; 113 std::array<TasData, PLAYER_NUMBER> tas_data;
110 bool is_recording{false}; 114 bool is_recording{false};
@@ -114,5 +118,8 @@ private:
114 std::vector<TASCommand> record_commands{}; 118 std::vector<TASCommand> record_commands{};
115 size_t current_command{0}; 119 size_t current_command{0};
116 TASCommand last_input{}; // only used for recording 120 TASCommand last_input{}; // only used for recording
121
122 // Old settings for swapping controllers
123 std::array<Settings::PlayerInput, 10> player_mappings;
117}; 124};
118} // namespace TasInput 125} // namespace TasInput