Config: Port BBDumpPort setting to new config system.

This commit is contained in:
Admiral H. Curtiss 2022-01-07 05:00:18 +01:00
parent 92d2fd9d5f
commit d8b67bc15f
No known key found for this signature in database
GPG Key ID: F051B4C4044F33FB
5 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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;

View File

@ -58,8 +58,6 @@ struct SConfig
bool bCopyWiiSaveNetplay = true;
int iBBDumpPort = 0;
bool bSyncGPU = false;
int iSyncGpuMaxDistance;
int iSyncGpuMinDistance;

View File

@ -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

View File

@ -148,6 +148,7 @@ private:
Common::SPSCQueue<Report> 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;
};