3015: Allow quitting instantly with SDL_QUIT when non-warning dialog showing r=Jupeyy a=def-



Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2020-10-06 00:33:04 +00:00 committed by GitHub
commit ecb5e4c790
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 1 deletions

View file

@ -253,6 +253,7 @@ public:
virtual void OnDummyDisconnect() = 0;
virtual void Echo(const char *pString) = 0;
virtual bool CanDisplayWarning() = 0;
virtual bool IsDisplayingWarning() = 0;
};
extern IGameClient *CreateGameClient();

View file

@ -3327,7 +3327,7 @@ void CClient::Run()
s_SavedConfig = true;
}
if(m_Warnings.empty() && GameClient()->CanDisplayWarning())
if(m_Warnings.empty() && !GameClient()->IsDisplayingWarning())
break;
}

View file

@ -2705,3 +2705,8 @@ bool CGameClient::CanDisplayWarning()
{
return m_pMenus->CanDisplayWarning();
}
bool CGameClient::IsDisplayingWarning()
{
return m_pMenus->GetCurPopup() == CMenus::POPUP_WARNING;
}

View file

@ -450,6 +450,7 @@ public:
void Echo(const char *pString);
bool IsOtherTeam(int ClientID);
bool CanDisplayWarning();
bool IsDisplayingWarning();
void LoadGameSkin(const char *pPath, bool AsDir = false);
void LoadEmoticonsSkin(const char *pPath, bool AsDir = false);