changeset 4136:8797fa6e2fb2 SDL-1.2

Fixed crash in SDL_SetGammaRamp()
author Sam Lantinga <slouken@libsdl.org>
date Fri, 25 Jan 2008 05:48:08 +0000
parents cd98d1dc385c
children be12463f31ea
files src/video/windib/SDL_dibvideo.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/windib/SDL_dibvideo.c	Thu Jan 24 15:50:20 2008 +0000
+++ b/src/video/windib/SDL_dibvideo.c	Fri Jan 25 05:48:08 2008 +0000
@@ -784,8 +784,10 @@
 		if ( screen_pal && (flags & (SDL_FULLSCREEN|SDL_HWPALETTE)) ) {
 			grab_palette = TRUE;
 		}
-		/* BitBlt() maps colors for us */
-		video->flags |= SDL_HWPALETTE;
+		if ( screen_pal ) {
+			/* BitBlt() maps colors for us */
+			video->flags |= SDL_HWPALETTE;
+		}
 	}
 #ifndef _WIN32_WCE
 	/* Resize the window */