From 756659b00e3c09a8aa958ef5b4e519d3dafcc4f0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 21 Sep 2009 01:15:11 +0000 Subject: Add more shouldQuit checks in event loops. svn-id: r44230 --- engines/cine/various.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/cine/various.cpp') diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index 7192afcd92..015ee1dd2f 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -694,7 +694,7 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, do { manageEvents(); getMouseData(mouseUpdateStatus, &button, &dummyU16, &dummyU16); - } while (button); + } while (button && !g_cine->shouldQuit()); var_A = 0; @@ -764,7 +764,7 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, // } } - } while (!var_A); + } while (!var_A && !g_cine->shouldQuit()); assert(!needMouseSave); @@ -775,7 +775,7 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, do { manageEvents(); getMouseData(mouseUpdateStatus, &button, &dummyU16, &dummyU16); - } while (button); + } while (button && !g_cine->shouldQuit()); if (var_4 == 2) { // recheck if (!recheckValue) @@ -860,7 +860,7 @@ uint16 executePlayerInput(void) { do { manageEvents(); getMouseData(mouseUpdateStatus, &mouseButton, &dummyU16, &dummyU16); - } while (mouseButton); + } while (mouseButton && !g_cine->shouldQuit()); si = getObjectUnderCursor(mouseX, mouseY); @@ -976,7 +976,7 @@ uint16 executePlayerInput(void) { di = 0; getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY); - while (mouseButton) { + while (mouseButton && !g_cine->shouldQuit()) { if (mouseButton & 1) { di |= 1; } @@ -1619,7 +1619,7 @@ bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxL getMouseData(0, &mouseButton, &mouseX, &mouseY); - if (mouseButton & 2) + if ((mouseButton & 2) || g_cine->shouldQuit()) quit = 2; else if (mouseButton & 1) quit = 1; -- cgit v1.2.3