diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-07-06 19:39:42 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-07-06 19:53:23 -0400 |
| commit | 675260b0f7b164dca59d2888ee2c58a921ca02c1 (patch) | |
| tree | 30f4ad69ac10e2c2a9dc37ceed7c0d182246d792 /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | 3d1a7737d86f4ecdf0131f5b84198f288800da3b (diff) | |
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.
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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) { |
