change pack alignment for opengl screenshot saving.

more useful error messages from ffread.cpp and language.c
This commit is contained in:
Steven Fuller 2002-11-30 01:41:25 +00:00 committed by Patryk Obara
parent e8789932e5
commit 03c87b518b
3 changed files with 33 additions and 11 deletions

View file

@ -182,6 +182,7 @@ unsigned char *GetScreenShot24(int *width, int *height)
buf = (unsigned char *)malloc(surface->w * surface->h * 3);
if (surface->flags & SDL_OPENGL) {
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glReadPixels(0, 0, surface->w, surface->h, GL_RGB, GL_UNSIGNED_BYTE, buf);
} else {