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:
parent
30b368643e
commit
935d3bb425
1 changed files with 5 additions and 0 deletions
|
@ -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++];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue