[Scummvm-cvs-logs] scummvm master -> 05c748efa3d42ffb3bfe64770837efd24a9fa29c
wjp
wjp at usecode.org
Tue Nov 15 21:01:59 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
05c748efa3 DREAMWEB: Fix crash on quit
Commit: 05c748efa3d42ffb3bfe64770837efd24a9fa29c
https://github.com/scummvm/scummvm/commit/05c748efa3d42ffb3bfe64770837efd24a9fa29c
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-11-15T11:59:03-08:00
Commit Message:
DREAMWEB: Fix crash on quit
The functions 'mainscreen' and 'screenupdate' can set kQuitrequested,
so we have to check that from their callers.
Changed paths:
devtools/tasmrecover/dreamweb/dreamweb.asm
engines/dreamweb/dreamgen.cpp
engines/dreamweb/stubs.cpp
diff --git a/devtools/tasmrecover/dreamweb/dreamweb.asm b/devtools/tasmrecover/dreamweb/dreamweb.asm
index 8a52435..d8a728c 100644
--- a/devtools/tasmrecover/dreamweb/dreamweb.asm
+++ b/devtools/tasmrecover/dreamweb/dreamweb.asm
@@ -1129,6 +1129,8 @@ Screenupdate proc near
call newplace
call mainscreen
+ cmp quitrequested, 0
+ jnz finishearly
call animpointer
call showpointer
cmp watchingtime,0
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6643ab0..ba315f2 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -13491,6 +13491,9 @@ void DreamGenContext::screenupdate() {
STACK_CHECK;
newplace();
mainscreen();
+ _cmp(data.byte(kQuitrequested), 0);
+ if (!flags.z())
+ return /* (finishearly) */;
animpointer();
showpointer();
_cmp(data.word(kWatchingtime), 0);
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 97d0f08..7987721 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -140,6 +140,9 @@ void DreamGenContext::dreamweb() {
screenupdate();
+ if (data.byte(kQuitrequested))
+ return; // exit game
+
if (data.byte(kWongame) != 0) {
// "endofgame"
clearbeforeload();
More information about the Scummvm-git-logs
mailing list