diff options
| author | Steven Fuller <relnev@icculus.org> | 2001-12-07 02:17:34 +0000 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 02:22:37 +0200 |
| commit | e196a237d4920fe4cc26da0c8088ea4823a5b3ea (patch) | |
| tree | 7ead08dee64966ea620ea2f9dbb96f9385726118 /src | |
| parent | 790a20ef7ca9fbb88129380f5e96fa23fb13447e (diff) | |
Fixed the dark opengl screenshots and video mode not being initialized.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |
