Fixed screenshots of windows that have a sizes not dividable by 4
authorgrumbel <grumbel@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Fri, 20 Nov 2009 06:10:03 +0000 (06:10 +0000)
committergrumbel <grumbel@837edb03-e0f3-0310-88ca-d4d4e8b29345>
Fri, 20 Nov 2009 06:10:03 +0000 (06:10 +0000)
git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6066 837edb03-e0f3-0310-88ca-d4d4e8b29345

src/video/gl/gl_renderer.cpp

index 41c8eec..bffa2cd 100644 (file)
@@ -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