From c4cd0d444a19d7eaf00537e4ac0f1a14ef29eb98 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 19 Nov 2016 15:36:26 +0000 Subject: [PATCH] NetPlay: Fix build when miniupnpc is disabled. --- Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h | 4 +++- Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h b/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h index 6f21a4006f..64297885ba 100644 --- a/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h +++ b/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h @@ -41,7 +41,9 @@ public: std::string game_name; u16 listen_port = 0; +#ifdef USE_UPNP bool forward_port; +#endif }; class NetPlayJoinConfig : public NetPlayLaunchConfig @@ -57,4 +59,4 @@ class NetPlayLauncher public: static bool Host(const NetPlayHostConfig& config); static bool Join(const NetPlayJoinConfig& config); -}; \ No newline at end of file +}; diff --git a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp index 7401875ab7..643b2fd959 100644 --- a/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp +++ b/Source/Core/DolphinWX/NetPlay/NetPlaySetupFrame.cpp @@ -337,7 +337,9 @@ void NetPlaySetupFrame::DoHost() host_config.player_name = WxStrToStr(m_nickname_text->GetValue()); host_config.game_list_ctrl = m_game_list; host_config.SetDialogInfo(netplay_section, m_parent); +#ifdef USE_UPNP host_config.forward_port = m_upnp_chk->GetValue(); +#endif if (host_config.use_traversal) {