[Scummvm-git-logs] scummvm master -> 5c8bd3b687ac166ada7d26362aa16523c002d6a6
eriktorbjorn
eriktorbjorn at telia.com
Wed Jun 30 17:19:09 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5c8bd3b687 SURFACESDL: Fix grabOverlay() regression
Commit: 5c8bd3b687ac166ada7d26362aa16523c002d6a6
https://github.com/scummvm/scummvm/commit/5c8bd3b687ac166ada7d26362aa16523c002d6a6
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2021-06-30T19:15:51+02:00
Commit Message:
SURFACESDL: Fix grabOverlay() regression
The grabOverlay() function would only copy half the width of the
overlay. This was probably more or less visible in any game that could
show a ScummVM dialog (e.g. the pause dialog in SCUMM games, or any
message box in the Hugo games).
Is crossBlit() overkill here? Probably, but it should fall back on
copyBlit() if the source and destination formats are the same.
Besides, this way perhaps I will finally get some more feedback on how
to fix the regression.
Changed paths:
backends/graphics/surfacesdl/surfacesdl-graphics.cpp
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 66d5a958ac..dc7a5da253 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -1703,12 +1703,8 @@ void SurfaceSdlGraphicsManager::grabOverlay(Graphics::Surface &surface) const {
byte *src = (byte *)_overlayscreen->pixels;
byte *dst = (byte *)surface.getPixels();
int h = MIN<int>(surface.h, _videoMode.overlayHeight);
- int pitch = MIN<int>(surface.w, _videoMode.overlayWidth * 2);
- do {
- memcpy(dst, src, pitch);
- src += _overlayscreen->pitch;
- dst += surface.pitch;
- } while (--h);
+ int w = MIN<int>(surface.w, _videoMode.overlayWidth);
+ crossBlit(dst, src, surface.pitch, _overlayscreen->pitch, w, h, surface.format, _overlayFormat);
SDL_UnlockSurface(_overlayscreen);
}
More information about the Scummvm-git-logs
mailing list