From e196a237d4920fe4cc26da0c8088ea4823a5b3ea Mon Sep 17 00:00:00 2001 From: Steven Fuller Date: Fri, 7 Dec 2001 02:17:34 +0000 Subject: Fixed the dark opengl screenshots and video mode not being initialized. --- src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 2e36f9b..4e0572f 100644 --- a/src/main.c +++ b/src/main.c @@ -94,7 +94,7 @@ unsigned char *GetScreenShot24(int *width, int *height) if (surface->flags & SDL_OPENGL) { glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glReadPixels(0, 0, surface->w, surface->h, GL_RGB, GL_BYTE, buf); + glReadPixels(0, 0, surface->w, surface->h, GL_RGB, GL_UNSIGNED_BYTE, buf); } else { unsigned char *ptrd; unsigned short int *ptrs; @@ -339,6 +339,8 @@ int InitSDL() return -1; } + LoadDeviceAndVideoModePreferences(); + surface = NULL; return 0; -- cgit v1.3