diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 2d41ece..58a8bb7 100644
a
|
b
|
void SurfaceSdlGraphicsManager::internUpdateScreen() {
|
1042 | 1042 | _dirtyRectList[0].y = 0; |
1043 | 1043 | _dirtyRectList[0].w = width; |
1044 | 1044 | _dirtyRectList[0].h = height; |
| 1045 | _dirtyArea = width * height; |
1045 | 1046 | } |
1046 | 1047 | |
1047 | 1048 | // Only draw anything if necessary |
… |
… |
void SurfaceSdlGraphicsManager::internUpdateScreen() {
|
1193 | 1194 | } |
1194 | 1195 | |
1195 | 1196 | _numDirtyRects = 0; |
| 1197 | _dirtyArea = 0; |
1196 | 1198 | _forceFull = false; |
1197 | 1199 | _mouseNeedsRedraw = false; |
1198 | 1200 | } |
… |
… |
void SurfaceSdlGraphicsManager::addDirtyRect(int x, int y, int w, int h, bool re
|
1387 | 1389 | return; |
1388 | 1390 | } |
1389 | 1391 | |
| 1392 | _dirtyArea += (w * h); |
| 1393 | if (_dirtyArea > width * height) { |
| 1394 | _forceFull = true; |
| 1395 | return; |
| 1396 | } |
| 1397 | |
1390 | 1398 | if (w > 0 && h > 0) { |
1391 | 1399 | SDL_Rect *r = &_dirtyRectList[_numDirtyRects++]; |
1392 | 1400 | |
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.h b/backends/graphics/surfacesdl/surfacesdl-graphics.h
index cd8710d..7d9c274 100644
a
|
b
|
protected:
|
241 | 241 | // Dirty rect management |
242 | 242 | SDL_Rect _dirtyRectList[NUM_DIRTY_RECT]; |
243 | 243 | int _numDirtyRects; |
| 244 | int32 _dirtyArea; |
244 | 245 | |
245 | 246 | struct MousePos { |
246 | 247 | // The mouse position, using either virtual (game) or real |