Qt: Disable some network settings in global config. Re-enable RPCN in global config.

This commit is contained in:
Megamouse 2023-03-04 11:39:26 +01:00
parent 8bc92a2cbb
commit 8409979dc5
2 changed files with 17 additions and 12 deletions

View File

@ -1322,29 +1322,34 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
m_emu_settings->EnhanceLineEdit(ui->edit_bind, emu_settings_type::BindAddress);
SubscribeTooltip(ui->gb_edit_bind, tooltips.settings.bind);
ui->gb_edit_bind->setEnabled(!!game);
m_emu_settings->EnhanceLineEdit(ui->edit_swaps, emu_settings_type::IpSwapList);
SubscribeTooltip(ui->gb_edit_swaps, tooltips.settings.dns_swap);
ui->gb_edit_swaps->setEnabled(!!game);
m_emu_settings->EnhanceCheckBox(ui->enable_upnp, emu_settings_type::EnableUpnp);
SubscribeTooltip(ui->enable_upnp, tooltips.settings.enable_upnp);
// Comboboxes
connect(ui->netStatusBox, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index)
{
if (index < 0) return;
const auto [text, value] = get_data(ui->netStatusBox, index);
ui->gb_edit_dns->setEnabled(static_cast<np_internet_status>(value) != np_internet_status::disabled);
ui->enable_upnp->setEnabled(static_cast<np_internet_status>(value) != np_internet_status::disabled);
});
m_emu_settings->EnhanceComboBox(ui->netStatusBox, emu_settings_type::InternetStatus);
SubscribeTooltip(ui->gb_netStatusBox, tooltips.settings.net_status);
connect(ui->netStatusBox, QOverload<int>::of(&QComboBox::currentIndexChanged), [this](int index)
{
ui->edit_dns->setEnabled(index > 0);
ui->enable_upnp->setEnabled(index > 0);
});
ui->edit_dns->setEnabled(ui->netStatusBox->currentIndex() > 0);
ui->enable_upnp->setEnabled(ui->netStatusBox->currentIndex() > 0);
m_emu_settings->EnhanceComboBox(ui->psnStatusBox, emu_settings_type::PSNStatus);
SubscribeTooltip(ui->gb_psnStatusBox, tooltips.settings.psn_status);
ui->gb_psnStatusBox->setEnabled(!!game);
if (!game)
{
remove_item(ui->psnStatusBox, static_cast<int>(np_psn_status::psn_fake), static_cast<int>(g_cfg.net.psn_status.def));
}
// _ _ _______ _
// /\ | | | | |__ __| | |

View File

@ -226,10 +226,10 @@ public:
// network
const QString net_status = tr("If set to Connected, RPCS3 will allow programs to use your internet connection.");
const QString psn_status = tr("Only available in custom configurations.\nIf set to RPCN, RPCS3 will use the RPCN server as PSN connection if the game is supported.\nIf set to Simulated, RPCS3 will try to fake the PSN connection, but any actual attempt at using the PSN functionality may result in errors or crashes.");
const QString psn_status = tr("If set to RPCN, RPCS3 will use the RPCN server as PSN connection if the game is supported.\nIf set to Simulated, RPCS3 will try to fake the PSN connection, but any actual attempt at using the PSN functionality may result in errors or crashes.\nSimulated is only available in custom configurations.");
const QString dns = tr("DNS used to resolve hostnames by applications.");
const QString dns_swap = tr("DNS Swap List.");
const QString bind = tr("Interface IP Address to bind to.");
const QString dns_swap = tr("DNS Swap List.\nOnly available in custom configurations.");
const QString bind = tr("Interface IP Address to bind to.\nOnly available in custom configurations.");
const QString enable_upnp = tr("Enable UPNP.\nThis will automatically forward ports bound on 0.0.0.0 if your router has UPNP enabled.");
// system