[SDL] Porting SDL to new hardware

Brian Gunn libsdl-gmane at gunnbr.org
Wed May 23 22:12:31 PDT 2007


Okay, I managed to get my port mostly working, but I did have to add a little
kludge.

My hardware's frame buffer is in 32-bit ARGB format.  But for some reason, doing
a blit always sets the alpha to 0.  I stepped through the code and finally
realized it was because the alpha mask of my surface was set to 0 even though I
set my pixel format's Amask in VideoInit() to be 0xFF000000.  I traced the
problem back to SDL_VideoInit().  For some reason, the call to
SDL_CreateRGBSurface() on line 253 of SDL_video.c (SDL version 1.2.11) passes in
a 0 for the alpha mask.  Once I changed this to instead pass in vformat.Amask as
the last parameter, my problem went away.

Is there something I should change in my driver to get this to work without
modifying SDL_video.c in this way?

Thanks!

Brian



More information about the SDL mailing list