Fixed screenshots of windows that have a sizes not dividable by 4
authorIngo Ruhnke <grumbel@gmx.de>
Fri, 20 Nov 2009 06:10:03 +0000 (06:10 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Fri, 20 Nov 2009 06:10:03 +0000 (06:10 +0000)
SVN-Revision: 6066

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