DolphinQt: Use input override system for TAS input windows

This lets the TAS input code use a higher-level interface for
overriding inputs instead of having to fiddle with raw bits.
WiiTASInputWindow in particular was messy with how much
controller code it had to re-implement.
This commit is contained in:
JosJuice
2021-03-21 22:42:33 +01:00
parent 8fd25259ee
commit b296248b49
21 changed files with 557 additions and 507 deletions

View File

@ -122,9 +122,6 @@ static bool s_bPolled = false;
static std::mutex s_input_display_lock;
static std::string s_InputDisplay[8];
static GCManipFunction s_gc_manip_func;
static WiiManipFunction s_wii_manip_func;
static std::string s_current_file_name;
static void GetSettings();
@ -1426,28 +1423,6 @@ void SaveRecording(const std::string& filename)
Core::DisplayMessage(fmt::format("Failed to save {}", filename), 2000);
}
void SetGCInputManip(GCManipFunction func)
{
s_gc_manip_func = std::move(func);
}
void SetWiiInputManip(WiiManipFunction func)
{
s_wii_manip_func = std::move(func);
}
// NOTE: CPU Thread
void CallGCInputManip(GCPadStatus* PadStatus, int controllerID)
{
if (s_gc_manip_func)
s_gc_manip_func(PadStatus, controllerID);
}
// NOTE: CPU Thread
void CallWiiInputManip(DataReportBuilder& rpt, int controllerID, int ext, const EncryptionKey& key)
{
if (s_wii_manip_func)
s_wii_manip_func(rpt, controllerID, ext, key);
}
// NOTE: GPU Thread
void SetGraphicsConfig()
{