diff src/video/windib/SDL_dibvideo.c @ 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 31c7c57af8a4
children 568c9b3c0167
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 */