WINTERMUTE: Respect EVENT_QUIT properly (and don't ask to quit anymore)

This commit is contained in:
Einar Johan Trøan Sømåen 2013-07-27 21:40:27 +02:00
parent b43bac6192
commit 28b8537530
2 changed files with 9 additions and 3 deletions

View File

@ -125,9 +125,12 @@ void BasePlatform::handleEvent(Common::Event *event) {
// _gameRef->AutoSaveOnExit();
// _gameRef->_quitting = true;
// }
if (_gameRef) {
_gameRef->onWindowClose();
}
// The engine CAN query for closing, but we disable it for now, as the EVENT_QUIT-event
// can't be stopped.
// if (_gameRef) {
// _gameRef->onWindowClose();
// }
break;
default:
// TODO: Do we care about any other events?

View File

@ -250,6 +250,9 @@ int WintermuteEngine::messageLoop() {
}
prevTime = time;
}
if (shouldQuit()) {
break;
}
if (_game && _game->_quitting) {
break;
}