Ticket #9203: dirty-rect-safety-valve.diff
File dirty-rect-safety-valve.diff, 1.2 KB (added by , 14 years ago) |
---|
-
backends/platform/sdl/graphics.cpp
858 858 _dirtyRectList[0].y = 0; 859 859 _dirtyRectList[0].w = width; 860 860 _dirtyRectList[0].h = height; 861 _dirtyArea = width * height; 861 862 } 862 863 863 864 // Only draw anything if necessary … … 936 937 } 937 938 938 939 _numDirtyRects = 0; 940 _dirtyArea = 0; 939 941 _forceFull = false; 940 942 _mouseNeedsRedraw = false; 941 943 } … … 1123 1125 return; 1124 1126 } 1125 1127 1128 _dirtyArea += (w * h); 1129 if (_dirtyArea > width * height) { 1130 _forceFull = true; 1131 return; 1132 } 1133 1126 1134 if (w > 0 && h > 0) { 1127 1135 SDL_Rect *r = &_dirtyRectList[_numDirtyRects++]; 1128 1136 -
backends/platform/sdl/sdl.h
356 356 // Dirty rect management 357 357 SDL_Rect _dirtyRectList[NUM_DIRTY_RECT]; 358 358 int _numDirtyRects; 359 int32 _dirtyArea; 359 360 360 361 // Keyboard mouse emulation. Disabled by fingolfin 2004-12-18. 361 362 // I am keeping the rest of the code in for now, since the joystick