refresh serverbrowser when disconnecting / abort

This commit is contained in:
Lukas Kitsche 2022-09-22 19:24:20 +02:00
parent f7c7852927
commit e5f3943f6e
2 changed files with 36 additions and 0 deletions

View file

@ -1783,6 +1783,24 @@ int CMenus::Render()
{
Client()->Disconnect();
m_Popup = POPUP_NONE;
if(g_Config.m_UiPage == PAGE_INTERNET)
ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET);
else if(g_Config.m_UiPage == PAGE_LAN)
ServerBrowser()->Refresh(IServerBrowser::TYPE_LAN);
else if(g_Config.m_UiPage == PAGE_FAVORITES)
ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
else if(g_Config.m_UiPage == PAGE_DDNET)
{
// start a new server list request
Client()->RequestDDNetInfo();
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
}
else if(g_Config.m_UiPage == PAGE_KOG)
{
// start a new server list request
Client()->RequestDDNetInfo();
ServerBrowser()->Refresh(IServerBrowser::TYPE_KOG);
}
}
if(Client()->MapDownloadTotalsize() > 0)

View file

@ -61,6 +61,24 @@ void CMenus::RenderGame(CUIRect MainView)
else
{
Client()->Disconnect();
if(g_Config.m_UiPage == PAGE_INTERNET)
ServerBrowser()->Refresh(IServerBrowser::TYPE_INTERNET);
else if(g_Config.m_UiPage == PAGE_LAN)
ServerBrowser()->Refresh(IServerBrowser::TYPE_LAN);
else if(g_Config.m_UiPage == PAGE_FAVORITES)
ServerBrowser()->Refresh(IServerBrowser::TYPE_FAVORITES);
else if(g_Config.m_UiPage == PAGE_DDNET)
{
// start a new server list request
Client()->RequestDDNetInfo();
ServerBrowser()->Refresh(IServerBrowser::TYPE_DDNET);
}
else if(g_Config.m_UiPage == PAGE_KOG)
{
// start a new server list request
Client()->RequestDDNetInfo();
ServerBrowser()->Refresh(IServerBrowser::TYPE_KOG);
}
}
}