summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 43a0278..22918df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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 {