diff options
author | Eugene Sandulenko | 2016-01-21 12:09:37 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:12:49 +0100 |
commit | f11721d036eac47c3e69725f40fb8961093d8869 (patch) | |
tree | 55afdebd64ff978c2bd82e35657144e181c13959 | |
parent | 632825d71bb54020c343db4ae45f6af221531557 (diff) | |
download | scummvm-rg350-f11721d036eac47c3e69725f40fb8961093d8869.tar.gz scummvm-rg350-f11721d036eac47c3e69725f40fb8961093d8869.tar.bz2 scummvm-rg350-f11721d036eac47c3e69725f40fb8961093d8869.zip |
WAGE: Proper background restoriation on dialog closing
-rw-r--r-- | engines/wage/dialog.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/wage/dialog.cpp b/engines/wage/dialog.cpp index 69bef75fbd..3cee886473 100644 --- a/engines/wage/dialog.cpp +++ b/engines/wage/dialog.cpp @@ -144,10 +144,7 @@ int Dialog::run() { bool shouldQuit = false; Common::Rect r(_bbox); - r.right++; - r.bottom++; - - _gui->_screen.copyRectToSurface(_tempSurface, r.left, r.top, r); + _tempSurface.copyRectToSurface(_gui->_screen.getBasePtr(_bbox.left, _bbox.top), _gui->_screen.pitch, 0, 0, _bbox.width() + 1, _bbox.height() + 1); while (!shouldQuit) { Common::Event event; @@ -188,7 +185,8 @@ int Dialog::run() { g_system->delayMillis(50); } - _tempSurface.copyRectToSurface(_gui->_screen, 0, 0, r); + _gui->_screen.copyRectToSurface(_tempSurface.getBasePtr(0, 0), _tempSurface.pitch, _bbox.left, _bbox.top, _bbox.width() + 1, _bbox.height() + 1); + g_system->copyRectToScreen(_gui->_screen.getBasePtr(r.left, r.top), _gui->_screen.pitch, r.left, r.top, r.width() + 1, r.height() + 1); return _pressedButton; } @@ -218,7 +216,7 @@ void Dialog::mouseMove(int x, int y) { void Dialog::mouseClick(int x, int y) { int match = matchButton(x, y); - if (match) { + if (match != -1) { _pressedButton = match; _mouseOverPressedButton = true; |