Skip to content

Commit

Permalink
KYRA: Fix palette glitch when quitting while viewing the family album…
Browse files Browse the repository at this point in the history
… in Kyra3.

Thanks to eriktorbjorn for noticing.
  • Loading branch information
Johannes Schickel committed Aug 12, 2013
1 parent d05f90f commit 160c5f4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions engines/kyra/screen.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 160c5f4

Please sign in to comment.