Don't check dialog for enterGameState in no graphics STK

This commit is contained in:
Benau 2020-02-25 09:55:59 +08:00
parent c9dc68e578
commit 40c57e8115

View File

@ -49,16 +49,17 @@ AbstractStateManager::AbstractStateManager()
void AbstractStateManager::enterGameState()
{
// you need to close any dialog before calling this
assert(!ModalDialog::isADialogActive());
assert(!ScreenKeyboard::isActive());
if (GUIEngine::isNoGraphics())
{
// No graphics STK won't push dialog
setGameState(GAME);
return;
}
// you need to close any dialog before calling this
assert(!ModalDialog::isADialogActive());
assert(!ScreenKeyboard::isActive());
if (getCurrentScreen() != NULL) getCurrentScreen()->tearDown();
m_menu_stack.clear();
m_menu_stack.emplace_back(RACE_STATE_NAME, (Screen*)NULL);