diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 42ffa4725..0eb85a905 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -2354,9 +2354,15 @@ void CMenus::SetMenuPage(int NewPage) if(NewPage >= PAGE_INTERNET && NewPage <= PAGE_FAVORITE_COMMUNITY_5) { g_Config.m_UiPage = NewPage; - if(!m_ShowStart && OldPage != NewPage) + bool ForceRefresh = false; + if(m_ForceRefreshLanPage) { - RefreshBrowserTab(false); + ForceRefresh = NewPage == PAGE_LAN; + m_ForceRefreshLanPage = false; + } + if(OldPage != NewPage || ForceRefresh) + { + RefreshBrowserTab(ForceRefresh); } } } diff --git a/src/game/client/components/menus.h b/src/game/client/components/menus.h index dae2b20de..67cf1a408 100644 --- a/src/game/client/components/menus.h +++ b/src/game/client/components/menus.h @@ -170,6 +170,7 @@ protected: bool m_JoinTutorial = false; bool m_CreateDefaultFavoriteCommunities = false; + bool m_ForceRefreshLanPage = false; char m_aNextServer[256]; diff --git a/src/game/client/components/menus_start.cpp b/src/game/client/components/menus_start.cpp index f32af9ff8..46875a33d 100644 --- a/src/game/client/components/menus_start.cpp +++ b/src/game/client/components/menus_start.cpp @@ -155,6 +155,7 @@ void CMenus::RenderStartMenu(CUIRect MainView) if(str_find(aBuf, "/") == 0 || fs_is_file(aBuf)) { m_ServerProcess.m_Process = shell_execute(aBuf, EShellExecuteWindowState::BACKGROUND); + m_ForceRefreshLanPage = true; } else { @@ -285,8 +286,8 @@ void CMenus::RenderStartMenu(CUIRect MainView) if(NewPage != -1) { - m_MenuPage = NewPage; m_ShowStart = false; + SetMenuPage(NewPage); } } @@ -297,6 +298,7 @@ void CMenus::KillServer() if(kill_process(m_ServerProcess.m_Process)) { m_ServerProcess.m_Process = INVALID_PROCESS; + m_ForceRefreshLanPage = true; } } }