From: grumbel Date: Fri, 20 Nov 2009 06:10:03 +0000 (+0000) Subject: Fixed screenshots of windows that have a sizes not dividable by 4 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=10cb2b3ba41eef479b515ebf8f440ca0a3a742c9;p=supertux.git Fixed screenshots of windows that have a sizes not dividable by 4 git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6066 837edb03-e0f3-0310-88ca-d4d4e8b29345 --- diff --git a/src/video/gl/gl_renderer.cpp b/src/video/gl/gl_renderer.cpp index 41c8eec37..bffa2cd1f 100644 --- a/src/video/gl/gl_renderer.cpp +++ b/src/video/gl/gl_renderer.cpp @@ -470,6 +470,7 @@ GLRenderer::do_take_screenshot() SDL_FreeSurface(shot_surf); return; } + glPixelStorei(GL_PACK_ALIGNMENT, 1); glReadPixels(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, GL_RGB, GL_UNSIGNED_BYTE, pixels); // copy array line-by-line