mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 00:59:44 -06:00
NetPlayServer: handle port forwarding in constructor
This commit is contained in:
@ -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();
|
||||
|
@ -34,9 +34,7 @@ public:
|
||||
|
||||
std::string game_name;
|
||||
u16 listen_port = 0;
|
||||
#ifdef USE_UPNP
|
||||
bool forward_port;
|
||||
#endif
|
||||
bool forward_port = false;
|
||||
};
|
||||
|
||||
class NetPlayJoinConfig : public NetPlayLaunchConfig
|
||||
|
Reference in New Issue
Block a user