[Scummvm-git-logs] scummvm master -> 188caf1130c1fbe344bc7395b68763dc56f2d40f
aquadran
aquadran at gmail.com
Mon Nov 8 19:02:25 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:
188caf1130 STARK: Fixed savegame screenshots for software renderer
Commit: 188caf1130c1fbe344bc7395b68763dc56f2d40f
https://github.com/scummvm/scummvm/commit/188caf1130c1fbe344bc7395b68763dc56f2d40f
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2021-11-08T20:02:20+01:00
Commit Message:
STARK: Fixed savegame screenshots for software renderer
Changed paths:
engines/stark/gfx/tinygl.cpp
diff --git a/engines/stark/gfx/tinygl.cpp b/engines/stark/gfx/tinygl.cpp
index 814d0c8e2b..5a5b8da993 100644
--- a/engines/stark/gfx/tinygl.cpp
+++ b/engines/stark/gfx/tinygl.cpp
@@ -172,11 +172,14 @@ Common::Rect TinyGLDriver::getUnscaledViewport() const {
}
Graphics::Surface *TinyGLDriver::getViewportScreenshot() const {
+ Graphics::Surface *tmp = new Graphics::Surface();
+ tmp->create(_viewport.width(), _viewport.height(), getRGBAPixelFormat());
Graphics::Surface *s = new Graphics::Surface();
s->create(_viewport.width(), _viewport.height(), getRGBAPixelFormat());
- Graphics::PixelBuffer buf(s->format, (byte *)s->getPixels());
+ Graphics::PixelBuffer buf(tmp->format, (byte *)tmp->getPixels());
_fb->copyToBuffer(buf);
- flipVertical(s);
+ s->copyRectToSurface(tmp->getBasePtr(_viewport.left, _viewport.top), tmp->pitch, 0, 0, _viewport.width(), _viewport.height());
+ delete tmp;
return s;
}
More information about the Scummvm-git-logs
mailing list