From 160c5f4345d9d72faf3e42f1f82339d6ea9cc79e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 Aug 2013 04:58:27 +0200 Subject: [PATCH] KYRA: Fix palette glitch when quitting while viewing the family album in Kyra3. Thanks to eriktorbjorn for noticing. --- engines/kyra/screen.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 054397a34a5b..8c97e46a8f5b 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) {