aboutsummaryrefslogtreecommitdiff
path: root/engines/made/script.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2009-01-17 04:50:13 +0000
committerTorbjörn Andersson2009-01-17 04:50:13 +0000
commiteb0ea6a297c53920971a6a234f78a2ec60849c46 (patch)
tree0c0f64575f31460673c09f5f2fd848e7cd1b245d /engines/made/script.cpp
parent736fea2c0e241a8ec412ff97aaabb03f817d6806 (diff)
downloadscummvm-rg350-eb0ea6a297c53920971a6a234f78a2ec60849c46.tar.gz
scummvm-rg350-eb0ea6a297c53920971a6a234f78a2ec60849c46.tar.bz2
scummvm-rg350-eb0ea6a297c53920971a6a234f78a2ec60849c46.zip
Make sure that "quit" events are handled immediately. This fixes a warning - or
possibly worse - about an invalid opcode when quitting the game. svn-id: r35879
Diffstat (limited to 'engines/made/script.cpp')
-rw-r--r--engines/made/script.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/made/script.cpp b/engines/made/script.cpp
index 45497b81a7..aa91eea341 100644
--- a/engines/made/script.cpp
+++ b/engines/made/script.cpp
@@ -427,6 +427,8 @@ void ScriptInterpreter::cmd_vsize() {
void ScriptInterpreter::cmd_exit() {
_vm->quitGame();
+ // Make sure the "quit" event is handled immediately
+ _vm->handleEvents();
}
void ScriptInterpreter::cmd_return() {
@@ -434,6 +436,8 @@ void ScriptInterpreter::cmd_return() {
// Check if returning from main function
if (_localStackPos == kScriptStackSize) {
_vm->quitGame();
+ // Make sure the "quit" event is handled immediately
+ _vm->handleEvents();
return;
}