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
This commit is contained in:
Torbjörn Andersson 2006-05-24 21:04:44 +00:00
parent 30b368643e
commit 935d3bb425

View File

@ -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++];