From d289fa5f981930d151c4d7d57fc5bed1dac63750 Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Thu, 19 Dec 2019 21:22:42 +0000 Subject: OPENGL: Ensure surfaces created by saveScreenshot are the right way up --- backends/graphics/opengl/opengl-graphics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'backends') diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index a01047e268..dfc8448d14 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -1323,10 +1323,12 @@ bool OpenGLGraphicsManager::saveScreenshot(const Common::String &filename) const #endif Graphics::Surface data; data.init(width, height, lineSize, &pixels.front(), format); + data.flipVertical(Common::Rect(width, height)); + #ifdef USE_PNG - return Image::writePNG(out, data, true); + return Image::writePNG(out, data); #else - return Image::writeBMP(out, data, true); + return Image::writeBMP(out, data); #endif } -- cgit v1.2.3