GRAPHICS: MACGUI: Clear whole surface when resizing

This removes black artifacts when previous text was narrower
This commit is contained in:
Eugene Sandulenko 2017-08-26 21:33:35 +02:00
parent 960ad3623f
commit f8284623c4

View file

@ -244,6 +244,7 @@ void MacText::reallocSurface() {
if (_surface->w < _textMaxWidth || _surface->h < _textMaxHeight) {
// realloc surface and copy old content
ManagedSurface *n = new ManagedSurface(_textMaxWidth, _textMaxHeight);
n->clear(_bgcolor);
n->blitFrom(*_surface, Common::Point(0, 0));
delete _surface;