mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
NetPlay: Add full Wii save sync
This adds the ability to sync all Wii saves, instead of only the selected game. Useful for cases like launching a game though GeckoOS.
This commit is contained in:
@ -85,6 +85,7 @@ NetPlayDialog::NetPlayDialog(QWidget* parent)
|
||||
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);
|
||||
|
||||
m_buffer_size_box->setValue(buffer_size);
|
||||
m_save_sd_box->setChecked(write_save_sdcard_data);
|
||||
@ -95,6 +96,7 @@ NetPlayDialog::NetPlayDialog(QWidget* parent)
|
||||
m_reduce_polling_rate_box->setChecked(reduce_polling_rate);
|
||||
m_strict_settings_sync_box->setChecked(strict_settings_sync);
|
||||
m_host_input_authority_box->setChecked(host_input_authority);
|
||||
m_sync_all_wii_saves_box->setChecked(sync_all_wii_saves);
|
||||
|
||||
ConnectWidgets();
|
||||
|
||||
@ -127,6 +129,7 @@ void NetPlayDialog::CreateMainLayout()
|
||||
m_strict_settings_sync_box = new QCheckBox(tr("Strict Settings Sync"));
|
||||
m_host_input_authority_box = new QCheckBox(tr("Host Input Authority"));
|
||||
m_sync_codes_box = new QCheckBox(tr("Sync Codes"));
|
||||
m_sync_all_wii_saves_box = new QCheckBox(tr("Sync All Wii Saves"));
|
||||
m_buffer_label = new QLabel(tr("Buffer:"));
|
||||
m_quit_button = new QPushButton(tr("Quit"));
|
||||
m_splitter = new QSplitter(Qt::Horizontal);
|
||||
@ -200,6 +203,7 @@ void NetPlayDialog::CreateMainLayout()
|
||||
options_boxes->addWidget(m_save_sd_box);
|
||||
options_boxes->addWidget(m_load_wii_box);
|
||||
options_boxes->addWidget(m_sync_save_data_box);
|
||||
options_boxes->addWidget(m_sync_all_wii_saves_box);
|
||||
options_boxes->addWidget(m_sync_codes_box);
|
||||
options_boxes->addWidget(m_record_input_box);
|
||||
options_boxes->addWidget(m_reduce_polling_rate_box);
|
||||
@ -339,6 +343,9 @@ void NetPlayDialog::ConnectWidgets()
|
||||
}
|
||||
});
|
||||
|
||||
connect(m_sync_save_data_box, &QCheckBox::stateChanged, this,
|
||||
[this](bool checked) { m_sync_all_wii_saves_box->setEnabled(checked); });
|
||||
|
||||
// SaveSettings() - Save Hosting-Dialog Settings
|
||||
|
||||
connect(m_buffer_size_box, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||
@ -351,6 +358,7 @@ void NetPlayDialog::ConnectWidgets()
|
||||
connect(m_reduce_polling_rate_box, &QCheckBox::stateChanged, this, &NetPlayDialog::SaveSettings);
|
||||
connect(m_strict_settings_sync_box, &QCheckBox::stateChanged, this, &NetPlayDialog::SaveSettings);
|
||||
connect(m_host_input_authority_box, &QCheckBox::stateChanged, this, &NetPlayDialog::SaveSettings);
|
||||
connect(m_sync_all_wii_saves_box, &QCheckBox::stateChanged, this, &NetPlayDialog::SaveSettings);
|
||||
}
|
||||
|
||||
void NetPlayDialog::OnChat()
|
||||
@ -464,6 +472,8 @@ void NetPlayDialog::OnStart()
|
||||
settings.m_StrictSettingsSync = m_strict_settings_sync_box->isChecked();
|
||||
settings.m_SyncSaveData = m_sync_save_data_box->isChecked();
|
||||
settings.m_SyncCodes = m_sync_codes_box->isChecked();
|
||||
settings.m_SyncAllWiiSaves =
|
||||
m_sync_all_wii_saves_box->isChecked() && m_sync_save_data_box->isChecked();
|
||||
|
||||
// Unload GameINI to restore things to normal
|
||||
Config::RemoveLayer(Config::LayerType::GlobalGame);
|
||||
@ -517,6 +527,7 @@ void NetPlayDialog::show(std::string nickname, bool use_traversal)
|
||||
m_reduce_polling_rate_box->setHidden(!is_hosting);
|
||||
m_strict_settings_sync_box->setHidden(!is_hosting);
|
||||
m_host_input_authority_box->setHidden(!is_hosting);
|
||||
m_sync_all_wii_saves_box->setHidden(!is_hosting);
|
||||
m_kick_button->setHidden(!is_hosting);
|
||||
m_assign_ports_button->setHidden(!is_hosting);
|
||||
m_md5_button->setHidden(!is_hosting);
|
||||
@ -817,6 +828,7 @@ void NetPlayDialog::SetOptionsEnabled(bool enabled)
|
||||
m_reduce_polling_rate_box->setEnabled(enabled);
|
||||
m_strict_settings_sync_box->setEnabled(enabled);
|
||||
m_host_input_authority_box->setEnabled(enabled);
|
||||
m_sync_all_wii_saves_box->setEnabled(enabled && m_sync_save_data_box->isChecked());
|
||||
}
|
||||
|
||||
m_record_input_box->setEnabled(enabled);
|
||||
@ -1011,6 +1023,7 @@ void NetPlayDialog::SaveSettings()
|
||||
Config::SetBase(Config::NETPLAY_REDUCE_POLLING_RATE, m_reduce_polling_rate_box->isChecked());
|
||||
Config::SetBase(Config::NETPLAY_STRICT_SETTINGS_SYNC, m_strict_settings_sync_box->isChecked());
|
||||
Config::SetBase(Config::NETPLAY_HOST_INPUT_AUTHORITY, m_host_input_authority_box->isChecked());
|
||||
Config::SetBase(Config::NETPLAY_SYNC_ALL_WII_SAVES, m_sync_all_wii_saves_box->isChecked());
|
||||
}
|
||||
|
||||
void NetPlayDialog::ShowMD5Dialog(const std::string& file_identifier)
|
||||
|
Reference in New Issue
Block a user