mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Refresh server list when the browser is activated
This commit is contained in:
parent
242320e735
commit
84b4772006
@ -43,9 +43,6 @@ CBrowser::CBrowser(void)
|
||||
{
|
||||
memset(m_szServerAddressBuffer, '\0', sizeof(m_szServerAddressBuffer));
|
||||
|
||||
std::thread refresh(&CBrowser::RefreshServerList, this);
|
||||
refresh.detach();
|
||||
|
||||
m_pszBrowserTitle = "Server Browser";
|
||||
m_rLockedIconBlob = GetModuleResource(IDB_PNG2);
|
||||
}
|
||||
@ -136,6 +133,21 @@ void CBrowser::RunTask()
|
||||
UpdateHostingStatus();
|
||||
timer.Start();
|
||||
}
|
||||
|
||||
if (m_bActivate)
|
||||
{
|
||||
if (m_bQueryListNonRecursive)
|
||||
{
|
||||
std::thread refresh(&CBrowser::RefreshServerList, g_pBrowser);
|
||||
refresh.detach();
|
||||
|
||||
m_bQueryListNonRecursive = false;
|
||||
}
|
||||
}
|
||||
else // Refresh server list the next time 'm_bActivate' evaluates to true.
|
||||
{
|
||||
m_bQueryListNonRecursive = true;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
|
||||
private:
|
||||
bool m_bInitialized = false;
|
||||
bool m_bQueryListNonRecursive = false; // When set, refreshes the server list once the next frame.
|
||||
char m_szServerAddressBuffer[256] = { '\0' };
|
||||
char m_szServerEncKeyBuffer[30] = { '\0' };
|
||||
float m_flFadeAlpha = 0.f;
|
||||
|
Loading…
x
Reference in New Issue
Block a user