From 68c6109e7645c46be7c4bbd20fc0f3d68897ccc5 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Thu, 23 Aug 2012 23:20:32 +0200 Subject: [PATCH] TONY: Draw the dirty rectangle debugging last. Otherwise the rects are overwritten by the actual drawing. --- engines/tony/window.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp index b603fa39f36..1e60e636f34 100644 --- a/engines/tony/window.cpp +++ b/engines/tony/window.cpp @@ -165,14 +165,16 @@ void RMWindow::getNewFrame(RMGfxTargetBuffer &bigBuf, Common::Rect *rcBoundEllip Common::Rect &r = *i; const byte *lpSrc = lpBuf + (RM_SX * 2) * r.top + (r.left * 2); copyRectToScreen(lpSrc, RM_SX * 2, r.left, r.top, r.width(), r.height()); - - if (_showDirtyRects) - // Frame the copied area with a rectangle - s->frameRect(r, 0xffffff); } - if (_showDirtyRects) + if (_showDirtyRects) { + for (i = dirtyRects.begin(); i != dirtyRects.end(); ++i) { + // Frame the copied area with a rectangle + s->frameRect(*i, 0xffffff); + } + g_system->unlockScreen(); + } } if (_bGrabThumbnail) {