diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-05-16 14:29:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-16 14:29:44 -0500 |
| commit | 3b3bf6a04c4f2e3431b2cd321dfa35c9a49844a2 (patch) | |
| tree | 2a92da0ec53a8febecedfd999e3b249f2225df54 /Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp | |
| parent | f1ffcf2b0064fe828294ffb1c35a9c73071841e7 (diff) | |
| parent | cb30862cfb808107f58087ca06fae41744d75e6c (diff) | |
Merge pull request #13459 from tygyh/Make-parameters-constants-DolphinQt-Netplay
DolphinQt/NetPlay: Make variables constant
Diffstat (limited to 'Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp index f99a493a77..8791cb9e92 100644 --- a/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp +++ b/Source/Core/DolphinQt/NetPlay/NetPlaySetupDialog.cpp @@ -36,19 +36,19 @@ NetPlaySetupDialog::NetPlaySetupDialog(const GameListModel& game_list_model, QWi CreateMainLayout(); - bool use_index = Config::Get(Config::NETPLAY_USE_INDEX); - std::string index_region = Config::Get(Config::NETPLAY_INDEX_REGION); - std::string index_name = Config::Get(Config::NETPLAY_INDEX_NAME); - std::string index_password = Config::Get(Config::NETPLAY_INDEX_PASSWORD); - std::string nickname = Config::Get(Config::NETPLAY_NICKNAME); - std::string traversal_choice = Config::Get(Config::NETPLAY_TRAVERSAL_CHOICE); - int connect_port = Config::Get(Config::NETPLAY_CONNECT_PORT); - int host_port = Config::Get(Config::NETPLAY_HOST_PORT); - int host_listen_port = Config::Get(Config::NETPLAY_LISTEN_PORT); - bool enable_chunked_upload_limit = Config::Get(Config::NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT); - u32 chunked_upload_limit = Config::Get(Config::NETPLAY_CHUNKED_UPLOAD_LIMIT); + const bool use_index = Config::Get(Config::NETPLAY_USE_INDEX); + const std::string index_region = Config::Get(Config::NETPLAY_INDEX_REGION); + const std::string index_name = Config::Get(Config::NETPLAY_INDEX_NAME); + const std::string index_password = Config::Get(Config::NETPLAY_INDEX_PASSWORD); + const std::string nickname = Config::Get(Config::NETPLAY_NICKNAME); + const std::string traversal_choice = Config::Get(Config::NETPLAY_TRAVERSAL_CHOICE); + const int connect_port = Config::Get(Config::NETPLAY_CONNECT_PORT); + const int host_port = Config::Get(Config::NETPLAY_HOST_PORT); + const int host_listen_port = Config::Get(Config::NETPLAY_LISTEN_PORT); + const bool enable_chunked_upload_limit = Config::Get(Config::NETPLAY_ENABLE_CHUNKED_UPLOAD_LIMIT); + const u32 chunked_upload_limit = Config::Get(Config::NETPLAY_CHUNKED_UPLOAD_LIMIT); #ifdef USE_UPNP - bool use_upnp = Config::Get(Config::NETPLAY_USE_UPNP); + const bool use_upnp = Config::Get(Config::NETPLAY_USE_UPNP); m_host_upnp->setChecked(use_upnp); #endif @@ -305,7 +305,7 @@ void NetPlaySetupDialog::OnConnectionTypeChanged(int index) m_reset_traversal_button->setHidden(index == 0); - std::string address = + const std::string address = index == 0 ? Config::Get(Config::NETPLAY_ADDRESS) : Config::Get(Config::NETPLAY_HOST_CODE); m_ip_label->setText(index == 0 ? tr("IP Address:") : tr("Host Code:")); |
