mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 17:18:53 +00:00
NetPlayServer: handle port forwarding in constructor
This commit is contained in:
parent
4b50e77a26
commit
b5d070b0cf
5 changed files with 11 additions and 31 deletions
|
@ -24,7 +24,7 @@ bool NetPlayLauncher::Host(const NetPlayHostConfig& config)
|
|||
}
|
||||
|
||||
netplay_server = new NetPlayServer(
|
||||
config.listen_port,
|
||||
config.listen_port, config.forward_port,
|
||||
NetTraversalConfig{config.use_traversal, config.traversal_host, config.traversal_port});
|
||||
|
||||
if (!netplay_server->is_connected)
|
||||
|
@ -36,13 +36,6 @@ bool NetPlayLauncher::Host(const NetPlayHostConfig& config)
|
|||
|
||||
netplay_server->ChangeGame(config.game_name);
|
||||
|
||||
#ifdef USE_UPNP
|
||||
if (config.forward_port)
|
||||
{
|
||||
netplay_server->TryPortmapping(config.listen_port);
|
||||
}
|
||||
#endif
|
||||
|
||||
npd = new NetPlayDialog(config.parent_window, config.game_list_ctrl, config.game_name, true);
|
||||
|
||||
NetPlayClient*& netplay_client = NetPlayDialog::GetNetPlayClient();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue