[Scummvm-devel] Mac OS X Problems in gsoc2009-16bit Branch
Willem Jan Palenstijn
wjp at usecode.org
Fri Jul 10 14:42:12 CEST 2009
On Fri, Jul 10, 2009 at 08:23:29AM -0400, Matthew Hoops wrote:
> Hi Jody, all,
>
> Currently in the gsoc2009-16bit branch, the "best" PixelFormat is
> chosen by creating a PixelFormat using parameters taken from
> _hwscreen->format. However, on Mac OS X (RGB565), I'm getting
> _hwscreen->format->Aloss and Ashift to be equal to 0. Since the
> PixelFormat the screen uses has the same *loss and *shift values as
> _hwscreen, the aLoss remains 0 which results in the alpha bleeding
> into the blue (bShift == 0) and turns whatever I copy to the screen
> very blueish. The easiest way to fix the problem for me was set aLoss
> to be equal to 8. However, this probably won't work for all systems.
>
> I had thought of something like this:
>
> if (format.bShift == format.aShift && format.aLoss == 0)
> format.aLoss = 8;
An alternative might be to check if SDL_PixelFormat::Amask is 0 when
converting from SDL_PixelFormat to PixelFormat, and if so, set aLoss to 8.
-Willem Jan
More information about the Scummvm-devel
mailing list