summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorTechjar <tecknojar@gmail.com>2019-05-30 17:44:02 -0400
committerTechjar <tecknojar@gmail.com>2019-05-30 18:07:03 -0400
commit199486ffb6174b45a3089738e434f69e26abc38d (patch)
tree718f497f2ce7e07515c95b28f59d0984dba16a4d /Source
parent8046f40784ac740b046b59f658aabb82edfdcc76 (diff)
Qt/NetPlayDialog: Move settings loading into LoadSettings
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp57
-rw-r--r--Source/Core/DolphinQt/NetPlay/NetPlayDialog.h1
2 files changed, 31 insertions, 27 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
index bf97cd87e8..98bdd40e6a 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.cpp
@@ -74,33 +74,7 @@ NetPlayDialog::NetPlayDialog(QWidget* parent)
CreateChatLayout();
CreatePlayersLayout();
CreateMainLayout();
-
- const int buffer_size = Config::Get(Config::NETPLAY_BUFFER_SIZE);
- const bool write_save_sdcard_data = Config::Get(Config::NETPLAY_WRITE_SAVE_SDCARD_DATA);
- const bool load_wii_save = Config::Get(Config::NETPLAY_LOAD_WII_SAVE);
- const bool sync_saves = Config::Get(Config::NETPLAY_SYNC_SAVES);
- const bool sync_codes = Config::Get(Config::NETPLAY_SYNC_CODES);
- const bool record_inputs = Config::Get(Config::NETPLAY_RECORD_INPUTS);
- const bool reduce_polling_rate = Config::Get(Config::NETPLAY_REDUCE_POLLING_RATE);
- const bool strict_settings_sync = Config::Get(Config::NETPLAY_STRICT_SETTINGS_SYNC);
- const bool host_input_authority = Config::Get(Config::NETPLAY_HOST_INPUT_AUTHORITY);
- const bool sync_all_wii_saves = Config::Get(Config::NETPLAY_SYNC_ALL_WII_SAVES);
- const bool golf_mode = Config::Get(Config::NETPLAY_GOLF_MODE);
- const bool golf_mode_overlay = Config::Get(Config::NETPLAY_GOLF_MODE_OVERLAY);
-
- m_buffer_size_box->setValue(buffer_size);
- m_save_sd_action->setChecked(write_save_sdcard_data);
- m_load_wii_action->setChecked(load_wii_save);
- m_sync_save_data_action->setChecked(sync_saves);
- m_sync_codes_action->setChecked(sync_codes);
- m_record_input_action->setChecked(record_inputs);
- m_reduce_polling_rate_action->setChecked(reduce_polling_rate);
- m_strict_settings_sync_action->setChecked(strict_settings_sync);
- m_host_input_authority_action->setChecked(host_input_authority);
- m_sync_all_wii_saves_action->setChecked(sync_all_wii_saves);
- m_golf_mode_action->setChecked(golf_mode);
- m_golf_mode_overlay_action->setChecked(golf_mode_overlay);
-
+ LoadSettings();
ConnectWidgets();
auto& settings = Settings::Instance().GetQSettings();
@@ -1033,6 +1007,35 @@ std::shared_ptr<const UICommon::GameFile> NetPlayDialog::FindGameFile(const std:
return nullptr;
}
+void NetPlayDialog::LoadSettings()
+{
+ const int buffer_size = Config::Get(Config::NETPLAY_BUFFER_SIZE);
+ const bool write_save_sdcard_data = Config::Get(Config::NETPLAY_WRITE_SAVE_SDCARD_DATA);
+ const bool load_wii_save = Config::Get(Config::NETPLAY_LOAD_WII_SAVE);
+ const bool sync_saves = Config::Get(Config::NETPLAY_SYNC_SAVES);
+ const bool sync_codes = Config::Get(Config::NETPLAY_SYNC_CODES);
+ const bool record_inputs = Config::Get(Config::NETPLAY_RECORD_INPUTS);
+ const bool reduce_polling_rate = Config::Get(Config::NETPLAY_REDUCE_POLLING_RATE);
+ const bool strict_settings_sync = Config::Get(Config::NETPLAY_STRICT_SETTINGS_SYNC);
+ const bool host_input_authority = Config::Get(Config::NETPLAY_HOST_INPUT_AUTHORITY);
+ const bool sync_all_wii_saves = Config::Get(Config::NETPLAY_SYNC_ALL_WII_SAVES);
+ const bool golf_mode = Config::Get(Config::NETPLAY_GOLF_MODE);
+ const bool golf_mode_overlay = Config::Get(Config::NETPLAY_GOLF_MODE_OVERLAY);
+
+ m_buffer_size_box->setValue(buffer_size);
+ m_save_sd_action->setChecked(write_save_sdcard_data);
+ m_load_wii_action->setChecked(load_wii_save);
+ m_sync_save_data_action->setChecked(sync_saves);
+ m_sync_codes_action->setChecked(sync_codes);
+ m_record_input_action->setChecked(record_inputs);
+ m_reduce_polling_rate_action->setChecked(reduce_polling_rate);
+ m_strict_settings_sync_action->setChecked(strict_settings_sync);
+ m_host_input_authority_action->setChecked(host_input_authority);
+ m_sync_all_wii_saves_action->setChecked(sync_all_wii_saves);
+ m_golf_mode_action->setChecked(golf_mode);
+ m_golf_mode_overlay_action->setChecked(golf_mode_overlay);
+}
+
void NetPlayDialog::SaveSettings()
{
Config::ConfigChangeCallbackGuard config_guard;
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.h b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.h
index 1c67b02a43..2df9afd6d2 100644
--- a/Source/Core/DolphinQt/NetPlay/NetPlayDialog.h
+++ b/Source/Core/DolphinQt/NetPlay/NetPlayDialog.h
@@ -66,6 +66,7 @@ public:
std::string FindGame(const std::string& game) override;
std::shared_ptr<const UICommon::GameFile> FindGameFile(const std::string& game) override;
+ void LoadSettings();
void SaveSettings();
void ShowMD5Dialog(const std::string& file_identifier) override;