Ticket #9203: dirty-rect-safety-valve2.diff
File dirty-rect-safety-valve2.diff, 1.2 KB (added by , 14 years ago) |
---|
-
backends/graphics/sdl/sdl-graphics.cpp
1030 1030 _dirtyRectList[0].y = 0; 1031 1031 _dirtyRectList[0].w = width; 1032 1032 _dirtyRectList[0].h = height; 1033 _dirtyArea = width * height; 1033 1034 } 1034 1035 1035 1036 // Only draw anything if necessary … … 1108 1109 } 1109 1110 1110 1111 _numDirtyRects = 0; 1112 _dirtyArea = 0; 1111 1113 _forceFull = false; 1112 1114 _mouseNeedsRedraw = false; 1113 1115 } … … 1302 1304 return; 1303 1305 } 1304 1306 1307 _dirtyArea += (w * h); 1308 if (_dirtyArea > width * height) { 1309 _forceFull = true; 1310 return; 1311 } 1312 1305 1313 if (w > 0 && h > 0) { 1306 1314 SDL_Rect *r = &_dirtyRectList[_numDirtyRects++]; 1307 1315 -
backends/graphics/sdl/sdl-graphics.h
235 235 // Dirty rect management 236 236 SDL_Rect _dirtyRectList[NUM_DIRTY_RECT]; 237 237 int _numDirtyRects; 238 int32 _dirtyArea; 238 239 239 240 struct MousePos { 240 241 // The mouse position, using either virtual (game) or real