[SDL] SDL_BlitSurface on MacOSX 10.3.9
Michael Ryan Bannon
ryan.bannon at humagade.com
Mon Jun 26 13:38:48 PDT 2006
Hello,
I'm using SDL_BlitSurface to blend two 800x600 backgrounds. One background
stays at an alpha at 255 and goes to 0 while the other one, on top of it,
goes from 0 to 255 at the same rate. Everything works fine except for one
odd anomoly: my code works fine on MacOSX 10.4.6 version but not on my
10.3.9. On the 10.3.9 machine, the back image (the one starting at 255) is
shifted to the right about 5 pixels. I even tried to simplfy it by doing
the following:
SDL_BlitSurface(srcSurface, NULL, targetSurface, NULL);
I can remedy the problem by setting the position of the backgrounds to the
right one pixel.
SDL_Rect rect;
rect.x = 1;
rect.y = 0;
...
SDL_BlitSurface(srcSurface, NULL, m_targetSurface, rect);
This works on both OSs, however I would then have a small black line on the
left side of my window.
Has anybody seen this problem before or have any idea what might be causing
it? I can provide more info if needed.
Thanks,
Ryan
More information about the SDL
mailing list