diff --git a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp index 4b6ea5a9c4..c56404a773 100644 --- a/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp +++ b/Source/Core/Core/ConfigLoaders/IsSettingSaveable.cpp @@ -119,6 +119,7 @@ bool IsSettingSaveable(const Config::Location& config_location) &Config::GetInfoForSIDevice(3).GetLocation(), &Config::MAIN_CPU_THREAD.GetLocation(), &Config::MAIN_MMU.GetLocation(), + &Config::MAIN_BB_DUMP_PORT.GetLocation(), // UI.General diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 5e4e883033..56b5049375 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -120,7 +120,6 @@ void SConfig::LoadCoreSettings(IniFile& ini) { IniFile::Section* core = ini.GetOrCreateSection("Core"); - core->Get("BBDumpPort", &iBBDumpPort, -1); core->Get("SyncGPU", &bSyncGPU, false); core->Get("SyncGpuMaxDistance", &iSyncGpuMaxDistance, 200000); core->Get("SyncGpuMinDistance", &iSyncGpuMinDistance, -200000); @@ -240,7 +239,6 @@ void SConfig::LoadDefaults() bAutomaticStart = false; bBootToPause = false; - iBBDumpPort = -1; bSyncGPU = false; bWii = false; diff --git a/Source/Core/Core/ConfigManager.h b/Source/Core/Core/ConfigManager.h index a86c7189eb..7226d4ee0c 100644 --- a/Source/Core/Core/ConfigManager.h +++ b/Source/Core/Core/ConfigManager.h @@ -58,8 +58,6 @@ struct SConfig bool bCopyWiiSaveNetplay = true; - int iBBDumpPort = 0; - bool bSyncGPU = false; int iSyncGpuMaxDistance; int iSyncGpuMinDistance; diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp index 1c57dff7ef..4f2896ad49 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp @@ -303,11 +303,11 @@ void Wiimote::Read() if (result > 0) { - if (SConfig::GetInstance().iBBDumpPort > 0 && m_index == WIIMOTE_BALANCE_BOARD) + if (m_balance_board_dump_port > 0 && m_index == WIIMOTE_BALANCE_BOARD) { static sf::UdpSocket Socket; Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost, - SConfig::GetInstance().iBBDumpPort); + m_balance_board_dump_port); } // Add it to queue @@ -324,11 +324,10 @@ bool Wiimote::Write() Report const& rpt = m_write_reports.Front(); - if (SConfig::GetInstance().iBBDumpPort > 0 && m_index == WIIMOTE_BALANCE_BOARD) + if (m_balance_board_dump_port > 0 && m_index == WIIMOTE_BALANCE_BOARD) { static sf::UdpSocket Socket; - Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost, - SConfig::GetInstance().iBBDumpPort); + Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost, m_balance_board_dump_port); } int ret = IOWrite(rpt.data(), rpt.size()); @@ -816,6 +815,7 @@ void Wiimote::ThreadFunc() void Wiimote::RefreshConfig() { m_speaker_enabled_in_dolphin_config = Config::Get(Config::MAIN_WIIMOTE_ENABLE_SPEAKER); + m_balance_board_dump_port = Config::Get(Config::MAIN_BB_DUMP_PORT); } int Wiimote::GetIndex() const diff --git a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h index 34573a0609..487d28024f 100644 --- a/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h +++ b/Source/Core/Core/HW/WiimoteReal/WiimoteReal.h @@ -148,6 +148,7 @@ private: Common::SPSCQueue m_write_reports; bool m_speaker_enabled_in_dolphin_config = false; + int m_balance_board_dump_port = 0; size_t m_config_changed_callback_id; };