From fb3a727fcc753f298f0c648c8fffc35ca4ae1bec Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 8 Apr 2024 16:58:32 -0700 Subject: 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. --- Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp | 5 +++++ Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup') diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp index 42e1acff5b..b4bb1699c0 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.cpp @@ -35,6 +35,11 @@ NumericSetting& Attachments::GetSelectionSetting() return m_selection_setting; } +SubscribableSettingValue& Attachments::GetAttachmentSetting() +{ + return m_selection_value; +} + const std::vector>& Attachments::GetAttachmentList() const { return m_attachments; diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.h b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.h index 7553639396..887231196b 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.h +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Attachments.h @@ -29,11 +29,12 @@ public: void SetSelectedAttachment(u32 val); NumericSetting& GetSelectionSetting(); + SubscribableSettingValue& GetAttachmentSetting(); const std::vector>& GetAttachmentList() const; private: - SettingValue m_selection_value; + SubscribableSettingValue m_selection_value; // This is here and not added to the list of numeric_settings because it's serialized differently, // by string (to be independent from the enum), and visualized differently in the UI. // For the rest, it's treated similarly to other numeric_settings in the group. -- cgit v1.2.3