mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-27 08:15:33 +01:00
Config: Port BBDumpPort setting to new config system.
This commit is contained in:
parent
92d2fd9d5f
commit
d8b67bc15f
@ -119,6 +119,7 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
|||||||
&Config::GetInfoForSIDevice(3).GetLocation(),
|
&Config::GetInfoForSIDevice(3).GetLocation(),
|
||||||
&Config::MAIN_CPU_THREAD.GetLocation(),
|
&Config::MAIN_CPU_THREAD.GetLocation(),
|
||||||
&Config::MAIN_MMU.GetLocation(),
|
&Config::MAIN_MMU.GetLocation(),
|
||||||
|
&Config::MAIN_BB_DUMP_PORT.GetLocation(),
|
||||||
|
|
||||||
// UI.General
|
// UI.General
|
||||||
|
|
||||||
|
@ -120,7 +120,6 @@ void SConfig::LoadCoreSettings(IniFile& ini)
|
|||||||
{
|
{
|
||||||
IniFile::Section* core = ini.GetOrCreateSection("Core");
|
IniFile::Section* core = ini.GetOrCreateSection("Core");
|
||||||
|
|
||||||
core->Get("BBDumpPort", &iBBDumpPort, -1);
|
|
||||||
core->Get("SyncGPU", &bSyncGPU, false);
|
core->Get("SyncGPU", &bSyncGPU, false);
|
||||||
core->Get("SyncGpuMaxDistance", &iSyncGpuMaxDistance, 200000);
|
core->Get("SyncGpuMaxDistance", &iSyncGpuMaxDistance, 200000);
|
||||||
core->Get("SyncGpuMinDistance", &iSyncGpuMinDistance, -200000);
|
core->Get("SyncGpuMinDistance", &iSyncGpuMinDistance, -200000);
|
||||||
@ -240,7 +239,6 @@ void SConfig::LoadDefaults()
|
|||||||
bAutomaticStart = false;
|
bAutomaticStart = false;
|
||||||
bBootToPause = false;
|
bBootToPause = false;
|
||||||
|
|
||||||
iBBDumpPort = -1;
|
|
||||||
bSyncGPU = false;
|
bSyncGPU = false;
|
||||||
bWii = false;
|
bWii = false;
|
||||||
|
|
||||||
|
@ -58,8 +58,6 @@ struct SConfig
|
|||||||
|
|
||||||
bool bCopyWiiSaveNetplay = true;
|
bool bCopyWiiSaveNetplay = true;
|
||||||
|
|
||||||
int iBBDumpPort = 0;
|
|
||||||
|
|
||||||
bool bSyncGPU = false;
|
bool bSyncGPU = false;
|
||||||
int iSyncGpuMaxDistance;
|
int iSyncGpuMaxDistance;
|
||||||
int iSyncGpuMinDistance;
|
int iSyncGpuMinDistance;
|
||||||
|
@ -303,11 +303,11 @@ void Wiimote::Read()
|
|||||||
|
|
||||||
if (result > 0)
|
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;
|
static sf::UdpSocket Socket;
|
||||||
Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost,
|
Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost,
|
||||||
SConfig::GetInstance().iBBDumpPort);
|
m_balance_board_dump_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add it to queue
|
// Add it to queue
|
||||||
@ -324,11 +324,10 @@ bool Wiimote::Write()
|
|||||||
|
|
||||||
Report const& rpt = m_write_reports.Front();
|
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;
|
static sf::UdpSocket Socket;
|
||||||
Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost,
|
Socket.send((char*)rpt.data(), rpt.size(), sf::IpAddress::LocalHost, m_balance_board_dump_port);
|
||||||
SConfig::GetInstance().iBBDumpPort);
|
|
||||||
}
|
}
|
||||||
int ret = IOWrite(rpt.data(), rpt.size());
|
int ret = IOWrite(rpt.data(), rpt.size());
|
||||||
|
|
||||||
@ -816,6 +815,7 @@ void Wiimote::ThreadFunc()
|
|||||||
void Wiimote::RefreshConfig()
|
void Wiimote::RefreshConfig()
|
||||||
{
|
{
|
||||||
m_speaker_enabled_in_dolphin_config = Config::Get(Config::MAIN_WIIMOTE_ENABLE_SPEAKER);
|
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
|
int Wiimote::GetIndex() const
|
||||||
|
@ -148,6 +148,7 @@ private:
|
|||||||
Common::SPSCQueue<Report> m_write_reports;
|
Common::SPSCQueue<Report> m_write_reports;
|
||||||
|
|
||||||
bool m_speaker_enabled_in_dolphin_config = false;
|
bool m_speaker_enabled_in_dolphin_config = false;
|
||||||
|
int m_balance_board_dump_port = 0;
|
||||||
|
|
||||||
size_t m_config_changed_callback_id;
|
size_t m_config_changed_callback_id;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user