LAB: Check for engine quit events

This commit is contained in:
Filippos Karapetis 2015-02-26 01:15:54 +02:00 committed by Eugene Sandulenko
parent 4cf271054a
commit cc0baf48ed
2 changed files with 8 additions and 2 deletions

View file

@ -741,7 +741,7 @@ static void mainGameLoop() {
WSDL_ProcessInput(1);
if (GotMessage) {
if (QuitLab) {
if (QuitLab || g_engine->shouldQuit()) {
stopDiff();
break;
}

View file

@ -69,11 +69,17 @@ void introEatMessages() {
while (1) {
Msg = getMsg();
if (g_engine->shouldQuit()) {
QuitIntro = true;
return;
}
if (Msg == NULL)
return;
else {
if (((Msg->Class == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & Msg->Qualifier)) ||
((Msg->Class == RAWKEY) && (Msg->Code == 27)))
((Msg->Class == RAWKEY) && (Msg->Code == 27))
)
QuitIntro = true;
replyMsg(Msg);