summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-03 18:49:40 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-03 18:49:40 +0300
commit27de1601aa4a952d9555cc9b1aba8630f9043af4 (patch)
treef53ab5bc933ee3d0ce15d9c9bf4c735fa3ef8edb /src
parentd5caed04f36381dc782c920f11199102809b4b66 (diff)
downloadplus-27de1601aa4a952d9555cc9b1aba8630f9043af4.tar.gz
plus-27de1601aa4a952d9555cc9b1aba8630f9043af4.tar.bz2
plus-27de1601aa4a952d9555cc9b1aba8630f9043af4.tar.xz
plus-27de1601aa4a952d9555cc9b1aba8630f9043af4.zip
Fix incorrect screenshots issue in opengl mode.v1.2.3.4
Diffstat (limited to 'src')
-rw-r--r--src/opengl1graphics.cpp4
-rw-r--r--src/openglgraphics.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl1graphics.cpp b/src/opengl1graphics.cpp
index 3be9490ef..b04deedac 100644
--- a/src/opengl1graphics.cpp
+++ b/src/opengl1graphics.cpp
@@ -540,8 +540,8 @@ void OpenGL1Graphics::prepareScreenshot()
SDL_Surface* OpenGL1Graphics::getScreenshot()
{
- int h = mTarget->h;
- int w = mTarget->w;
+ const int h = mTarget->h;
+ const int w = mTarget->w - (mTarget->w % 4);
GLint pack = 1;
SDL_Surface *screenshot = SDL_CreateRGBSurface(
diff --git a/src/openglgraphics.cpp b/src/openglgraphics.cpp
index 1c1e2f2e0..9dd655420 100644
--- a/src/openglgraphics.cpp
+++ b/src/openglgraphics.cpp
@@ -1085,8 +1085,8 @@ void OpenGLGraphics::prepareScreenshot()
SDL_Surface* OpenGLGraphics::getScreenshot()
{
- int h = mTarget->h;
- int w = mTarget->w;
+ const int h = mTarget->h;
+ const int w = mTarget->w - (mTarget->w % 4);
GLint pack = 1;
SDL_Surface *screenshot = SDL_CreateRGBSurface(