Hi,
the rotozoomSurfaceXY() function unconditionally sets the SDL_RLEACCEL and the SDL_SRCCOLORKEY flas on the returned surface, even if the source surface did not have either of them.
Internally, the function keeps a colorKeyAvailable flag which tells whether the source surface had a color key set, but for some reason it doesn't use it to decide whether the color key should be set on the new surface.
It may be that I have some bugs in the implementation of my SDL driver, where the presence of the SDL_SRCCOLORKEY generates some image corruption (part of the transparent pixels -- the input surfaces also have alpha -- become non-transparent) when I call SDL_DisplayFormatAlpha() on the returned surface, but, regardless of that, it doesn't look right that flags are added if the input surface didn't have them.
Please let me know if a patch is welcome.
Yes, a patch is welcome. Please post here so it is public. I am not sure when I get around to apply it (as this is rather old code)
Hi! Here it is :-)
Made a 2.0.27 release with this fix. Please check if that works for you.
Last edit: ferzkopp 2023-12-11