1 Mar 2007 01:01
Re: SDL displaying wrong colors with DirectX and windowed 8bpp mode
Todd A. Kennard <todd.a.kennard <at> earthlink.net>
2007-03-01 00:01:06 GMT
2007-03-01 00:01:06 GMT
From: Japheth <mail <at> japheth.de>Date: February 28, 2007 6:00:56 AM GMT-05:00To: "A list for developers using the SDL library. (includes SDL-announce)" <sdl <at> lists.libsdl.org>Subject: Re: [SDL] SDL displaying wrong colors with DirectX and windowed 8bpp modeReply-To: "A list for developers using the SDL library. \(includes SDL-announce\)" <sdl <at> lists.libsdl.org>But I possibly can try to add a SDL_SetColors/SDL_SetPalette call after SDL_SetVideoMode, setting the very same palette as it is done with SDL_VIDEODRIVER=windib.
This didn't help. I looked in the SDL source and realized that the code for directx carefully avoids touching palette entries 0-9 and 246-255 in window mode. So these 20 entries will always have the standard values. I'm sure there are good reasons doing so, but OTOH it would be good if directx and windib don't behave differently in this regard.
Those pallet entries mentioned are reserved for the Windows operating system default system colors. I've used them for my own purposes but always made sure to restore them when the application finished. You can do anything you want with software; it's just how much flak can you handle when your code misbehaves ? ;p
Todd
_______________________________________________ SDL mailing list SDL <at> lists.libsdl.org http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
RSS Feed