[SDL] No way to get a color key

necronology at cox.net necronology at cox.net
Thu Apr 2 20:15:58 PDT 2009

Hiyya, doing something like this?


My answer is use old sdl or use openGL...or wait

---- Mason Wheeler <masonwheeler at yahoo.com> wrote: 

As a workaround, you can get it like this:

(You may need to replace some or all of the dots with arrows.)
Problem is, the BlitMap field is supposed to be "private," according to the header, so that's a less than ideal solution.

From: Rick Page <mpcacrucesalus at gmail.com>
To: A list for developers using the SDL library. (includes SDL-announce) <sdl at lists.libsdl.org>
Sent: Thursday, April 2, 2009 11:58:29 AM
Subject: Re: [SDL] No way to get a color key

Yes, please :) I have been beating my head trying to figure out how to get the colorkey.

On Sat, Mar 28, 2009 at 8:15 PM, Mason Wheeler <masonwheeler at yahoo.com> wrote:

In SDL 1.2, colorkey was a field in SDL_PixelFormat and could easily be read.  It's since been moved to the info struct inside the blitmap struct inside the SDL_Surface, and no SDL_GetColorKey API function was added.  Could we get one please?

SDL mailing list
SDL at lists.libsdl.org

More information about the SDL mailing list