WiiTASInputWindow: Update controls when attachment changes

Change the displayed controls in the TAS Input window when the
controller's extension (including MotionPlus) is changed.

This previously required restarting Dolphin after the attachment was
changed, as the controls were never updated after the WiiTASInputWindow
was created at Dolphin startup.
This commit is contained in:
Dentomologist
2024-04-08 16:58:32 -07:00
parent 26ba8f5481
commit fb3a727fcc
7 changed files with 192 additions and 39 deletions

View File

@ -34,15 +34,22 @@ public:
void hideEvent(QHideEvent* event) override;
void showEvent(QShowEvent* event) override;
void UpdateExtension(int extension);
void UpdateMotionPlus(bool attached);
private:
WiimoteEmu::Wiimote* GetWiimote();
ControllerEmu::Attachments* GetAttachments();
WiimoteEmu::Extension* GetExtension();
void UpdateExt();
void LoadExtensionAndMotionPlus();
void UpdateControlVisibility();
void UpdateInputOverrideFunction();
WiimoteEmu::ExtensionNumber m_active_extension;
int m_attachment_callback_id = -1;
bool m_is_motion_plus_attached;
int m_motion_plus_callback_id = -1;
int m_num;
InputOverrider m_wiimote_overrider;