OPENGL: Properly take extra pixels into account when using scalers

As in SurfaceSDL, the dirty rect must be grown.
This commit is contained in:
Le Philousophe 2023-02-13 20:42:24 +01:00 committed by Eugene Sandulenko
parent 20ec21f743
commit c6c73ea0ea

View file

@ -573,6 +573,11 @@ void ScaledTexture::updateGLTexture() {
Common::Rect dirtyArea = getDirtyArea();
// Extend the dirty region for scalers
// that "smear" the screen, e.g. 2xSAI
dirtyArea.grow(_extraPixels);
dirtyArea.clip(Common::Rect(0, 0, _rgbData.w, _rgbData.h));
const byte *src = (const byte *)_rgbData.getBasePtr(dirtyArea.left, dirtyArea.top);
uint srcPitch = _rgbData.pitch;
byte *dst;