diff options
author | Cameron Cawley | 2019-12-19 21:22:42 +0000 |
---|---|---|
committer | Filippos Karapetis | 2020-01-02 20:53:29 +0200 |
commit | d289fa5f981930d151c4d7d57fc5bed1dac63750 (patch) | |
tree | 46c2778613b40c29fb87e979d35e2188fca93368 /backends/graphics | |
parent | ba035ac532a65457d55ec77b06273642d5191909 (diff) | |
download | scummvm-rg350-d289fa5f981930d151c4d7d57fc5bed1dac63750.tar.gz scummvm-rg350-d289fa5f981930d151c4d7d57fc5bed1dac63750.tar.bz2 scummvm-rg350-d289fa5f981930d151c4d7d57fc5bed1dac63750.zip |
OPENGL: Ensure surfaces created by saveScreenshot are the right way up
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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 } |