From: Ingo Ruhnke 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=2bd989d68bb07f5c05066ac1091cf97fd8d8e9d7;p=supertux.git Fixed screenshots of windows that have a sizes not dividable by 4 SVN-Revision: 6066 --- 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