diff --git a/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h b/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h index 6f21a4006f95..64297885ba86 100644 --- a/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h +++ b/Source/Core/DolphinWX/NetPlay/NetPlayLauncher.h @@ -41,7 +41,9 @@ class NetPlayHostConfig : public NetPlayLaunchConfig 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 7401875ab737..643b2fd9590e 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) {