From 675260b0f7b164dca59d2888ee2c58a921ca02c1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 6 Jul 2018 19:39:42 -0400 Subject: Core: Namespace NetPlay utilities under the NetPlay namespace Previously there was only one function under the NetPlay namespace, which is kind of silly considering we have all of these other types and functions existing outside of the namespace. This moves the rest of them into the namespace. This gets some general names, like Player, for example, out of the global namespace. --- Source/Core/DolphinQt/MainWindow.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Source/Core/DolphinQt/MainWindow.cpp') diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index b4883368af..1a4b04fa8a 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -1086,10 +1086,11 @@ bool MainWindow::NetPlayJoin() const std::string nickname = Config::Get(Config::NETPLAY_NICKNAME); // Create Client - Settings::Instance().ResetNetPlayClient(new NetPlayClient( + const bool is_hosting_netplay = Settings::Instance().GetNetPlayServer() != nullptr; + Settings::Instance().ResetNetPlayClient(new NetPlay::NetPlayClient( host_ip, host_port, m_netplay_dialog, nickname, - NetTraversalConfig{Settings::Instance().GetNetPlayServer() != nullptr ? false : is_traversal, - traversal_host, traversal_port})); + NetPlay::NetTraversalConfig{is_hosting_netplay ? false : is_traversal, traversal_host, + traversal_port})); if (!Settings::Instance().GetNetPlayClient()->IsConnected()) { @@ -1133,8 +1134,9 @@ bool MainWindow::NetPlayHost(const QString& game_id) host_port = Config::Get(Config::NETPLAY_LISTEN_PORT); // Create Server - Settings::Instance().ResetNetPlayServer(new NetPlayServer( - host_port, use_upnp, NetTraversalConfig{is_traversal, traversal_host, traversal_port})); + Settings::Instance().ResetNetPlayServer(new NetPlay::NetPlayServer( + host_port, use_upnp, + NetPlay::NetTraversalConfig{is_traversal, traversal_host, traversal_port})); if (!Settings::Instance().GetNetPlayServer()->is_connected) { -- cgit v1.2.3