aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-08 20:16:48 +0200
committerEinar Johan Trøan Sømåen2012-07-08 20:16:48 +0200
commit5b70ee9e82f94948f7df7ad40384b851502d97d6 (patch)
tree59fa2a073fdbd7b4ba437c27884c2bf341f07b23 /engines/wintermute
parent5afd4c966e99c4bd7f413f61efa2a0cf8fee4ecc (diff)
downloadscummvm-rg350-5b70ee9e82f94948f7df7ad40384b851502d97d6.tar.gz
scummvm-rg350-5b70ee9e82f94948f7df7ad40384b851502d97d6.tar.bz2
scummvm-rg350-5b70ee9e82f94948f7df7ad40384b851502d97d6.zip
WINTERMUTE: Fix the "was drawn last time, in different order now"-case for dirty rects.
Diffstat (limited to 'engines/wintermute')
-rw-r--r--engines/wintermute/Base/BRenderSDL.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/engines/wintermute/Base/BRenderSDL.cpp b/engines/wintermute/Base/BRenderSDL.cpp
index 56df72c8b3..1607161ab3 100644
--- a/engines/wintermute/Base/BRenderSDL.cpp
+++ b/engines/wintermute/Base/BRenderSDL.cpp
@@ -394,9 +394,19 @@ void CBRenderSDL::drawFromTicket(RenderTicket *renderTicket) {
if (_drawNum == renderTicket->_drawNum) {
_drawNum++;
} else {
- // Is not in order
- renderTicket->_drawNum = _drawNum++;
- addDirtyRect(renderTicket->_dstRect);
+ // Remove the ticket from the list
+ RenderQueueIterator it = _renderQueue.begin();
+ while (it != _renderQueue.end()) {
+ if ((*it) == renderTicket) {
+ it = _renderQueue.erase(it);
+ break;
+ } else {
+ it++;
+ }
+ }
+ // Is not in order, so readd it as if it was a new ticket
+ renderTicket->_drawNum = 0;
+ drawFromTicket(renderTicket);
}
}
}