aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorJohannes Schickel2013-08-12 04:58:27 +0200
committerJohannes Schickel2013-08-12 04:58:27 +0200
commit160c5f4345d9d72faf3e42f1f82339d6ea9cc79e (patch)
treedba184d5a1af7413e0bf9305d9ddea7203778286 /engines/kyra
parentd05f90fa0fe71750c6126fc0f14c4215cf3bfc32 (diff)
downloadscummvm-rg350-160c5f4345d9d72faf3e42f1f82339d6ea9cc79e.tar.gz
scummvm-rg350-160c5f4345d9d72faf3e42f1f82339d6ea9cc79e.tar.bz2
scummvm-rg350-160c5f4345d9d72faf3e42f1f82339d6ea9cc79e.zip
KYRA: Fix palette glitch when quitting while viewing the family album in Kyra3.
Thanks to eriktorbjorn for noticing.
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/screen.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 054397a34a..8c97e46a8f 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -718,6 +718,13 @@ void Screen::fadePalette(const Palette &pal, int delay, const UpdateFunctor *upF
_vm->delay((delayAcc >> 8) * 1000 / 60);
delayAcc &= 0xFF;
}
+
+ // In case we should quit we setup the final palette here. This avoids
+ // ugly palette glitches when quitting while fading. This can for example
+ // be noticed when quitting while viewing the family album in Kyra3.
+ if (_vm->shouldQuit()) {
+ setScreenPalette(pal);
+ }
}
void Screen::getFadeParams(const Palette &pal, int delay, int &delayInc, int &diff) {