mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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.
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user