diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp index a824725b79..8f2dff9aca 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp @@ -143,16 +143,8 @@ void AddWiimoteToPool(std::unique_ptr wiimote) s_wiimote_pool.emplace_back(WiimotePoolEntry{std::move(wiimote)}); } -Wiimote::Wiimote() -{ - m_config_changed_callback_id = Config::AddConfigChangedCallback([this] { RefreshConfig(); }); - RefreshConfig(); -} - -Wiimote::~Wiimote() -{ - Config::RemoveConfigChangedCallback(m_config_changed_callback_id); -} +Wiimote::Wiimote() = default; +Wiimote::~Wiimote() = default; void Wiimote::Shutdown() { @@ -268,7 +260,8 @@ void Wiimote::InterruptDataOutput(const u8* data, const u32 size) leds_rpt.leds = 0xf; } } - else if (rpt[1] == u8(OutputReportID::SpeakerData) && !m_speaker_enabled_in_dolphin_config) + else if (rpt[1] == u8(OutputReportID::SpeakerData) && + !Config::Get(Config::MAIN_WIIMOTE_ENABLE_SPEAKER)) { rpt.resize(3); // Translate undesired speaker data reports into rumble reports. @@ -844,11 +837,6 @@ void Wiimote::WriteThreadFunc() DisconnectInternal(); } -void Wiimote::RefreshConfig() -{ - m_speaker_enabled_in_dolphin_config = Config::Get(Config::MAIN_WIIMOTE_ENABLE_SPEAKER); -} - int Wiimote::GetIndex() const { return m_index; diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h index e285d2bcdb..6934e85ecf 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h @@ -11,7 +11,6 @@ #include #include -#include "Common/Config/Config.h" #include "Common/Event.h" #include "Common/Flag.h" #include "Common/SPSCQueue.h" @@ -65,7 +64,7 @@ public: bool IsBalanceBoard(); - void InterruptDataOutput(const u8* data, const u32 size) override; + void InterruptDataOutput(const u8* data, u32 size) override; u8 GetWiimoteDeviceIndex() const override; void SetWiimoteDeviceIndex(u8 index) override; @@ -147,8 +146,6 @@ private: void ReadThreadFunc(); void WriteThreadFunc(); - void RefreshConfig(); - std::atomic m_is_linked = false; // And we track the rumble state to drop unnecessary rumble reports. @@ -164,10 +161,6 @@ private: Common::SPSCQueue m_write_reports; // Kick the write thread. Common::Event m_write_event; - - bool m_speaker_enabled_in_dolphin_config = false; - - Config::ConfigChangedCallbackID m_config_changed_callback_id; }; class WiimoteScannerBackend