GUI: Don't assume ManagedSurface's pitch

This caused corruption with small scale's cursor (18px) if
ManagedSurface's inner surface used a different pitch than w *
format.bytesPerPixel.
This commit is contained in:
Miro Kropacek 2023-05-22 23:05:37 +02:00
parent 62d3a3c16e
commit 650ccb6ded

View File

@ -1639,6 +1639,8 @@ bool ThemeEngine::createCursor(const Common::String &filename, int hotspotX, int
const int index = colorToIndex[col];
_cursor[y * _cursorWidth + x] = index;
}
src += cursor->pitch - cursor->w * cursor->format.bytesPerPixel;
}
_useCursor = true;