From fb26a42aad0ec1c5b6d1fb141446ec158995995d Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Thu, 10 Aug 2017 20:51:27 +0200 Subject: MOHAWK: Myst: Restore the backbuffer after toggling off fireplace buttons Fixes #10064 --- engines/mohawk/myst_stacks/myst.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/mohawk') diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index 1ee8420472..dbc4ff55b8 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -843,6 +843,7 @@ void Myst::o_fireplaceToggleButton(uint16 var, const ArgumentsArray &args) { // Used on Myst Card 4162 (Fireplace Grid) uint16 bitmask = args[0]; uint16 line = _fireplaceLines[var - 17]; + Common::Rect buttonRect = getInvokingResource()->getRect(); // The animations are too slow when playing each animation image at 60fps. // Only play every second image. @@ -850,14 +851,15 @@ void Myst::o_fireplaceToggleButton(uint16 var, const ArgumentsArray &args) { if (line & bitmask) { // Unset button for (uint i = 4795; i >= 4779; i -= 2) { - _vm->_gfx->copyImageToScreen(i, getInvokingResource()->getRect()); + _vm->_gfx->copyImageToScreen(i, buttonRect); _vm->doFrame(); } + _vm->_gfx->copyBackBufferToScreen(buttonRect); _fireplaceLines[var - 17] &= ~bitmask; } else { // Set button for (uint i = 4779; i <= 4795; i += 2) { - _vm->_gfx->copyImageToScreen(i, getInvokingResource()->getRect()); + _vm->_gfx->copyImageToScreen(i, buttonRect); _vm->doFrame(); } _fireplaceLines[var - 17] |= bitmask; -- cgit v1.2.3