mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-11 21:52:40 +00:00
Fix NetPlay using some config values wrongly
This commit is contained in:
parent
14317c8a0f
commit
eeff5e07ff
2 changed files with 11 additions and 7 deletions
|
@ -1066,6 +1066,9 @@ bool MainWindow::NetPlayJoin()
|
|||
}
|
||||
|
||||
// Settings
|
||||
const std::string traversal_choice = Config::Get(Config::NETPLAY_TRAVERSAL_CHOICE);
|
||||
const bool is_traversal = traversal_choice == "traversal";
|
||||
|
||||
std::string host_ip;
|
||||
u16 host_port;
|
||||
if (Settings::Instance().GetNetPlayServer() != nullptr)
|
||||
|
@ -1075,13 +1078,11 @@ bool MainWindow::NetPlayJoin()
|
|||
}
|
||||
else
|
||||
{
|
||||
host_ip = Config::Get(Config::NETPLAY_HOST_CODE);
|
||||
host_port = Config::Get(Config::NETPLAY_HOST_PORT);
|
||||
host_ip = is_traversal ? Config::Get(Config::NETPLAY_HOST_CODE) :
|
||||
Config::Get(Config::NETPLAY_ADDRESS);
|
||||
host_port = Config::Get(Config::NETPLAY_CONNECT_PORT);
|
||||
}
|
||||
|
||||
const std::string traversal_choice = Config::Get(Config::NETPLAY_TRAVERSAL_CHOICE);
|
||||
const bool is_traversal = traversal_choice == "traversal";
|
||||
|
||||
const std::string traversal_host = Config::Get(Config::NETPLAY_TRAVERSAL_SERVER);
|
||||
const u16 traversal_port = Config::Get(Config::NETPLAY_TRAVERSAL_PORT);
|
||||
const std::string nickname = Config::Get(Config::NETPLAY_NICKNAME);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue