From 935d3bb4254365e557642b2713eca8b31ab3eb86 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 24 May 2006 21:04:44 +0000 Subject: The AGI engine's save/load dialog dirties the entire screen thirteen times each iteration of the loop, causing a serious slowdown on my computer. It empathically should not be doing that, of course, but to safe-guard against such patological cases, if the entire screen is dirtied even once we can set _forceFull to true. svn-id: r22616 --- backends/sdl/graphics.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'backends') diff --git a/backends/sdl/graphics.cpp b/backends/sdl/graphics.cpp index b733921b65..8baeb94ab8 100644 --- a/backends/sdl/graphics.cpp +++ b/backends/sdl/graphics.cpp @@ -907,6 +907,11 @@ void OSystem_SDL::addDirtyRect(int x, int y, int w, int h) { } #endif + if (w == width && h == height) { + _forceFull = true; + return; + } + if (w > 0 && h > 0) { SDL_Rect *r = &_dirtyRectList[_numDirtyRects++]; -- cgit v1.2.3