SDL_BlitScaled does weird things to my source surface

Hi list,

When I call SDL_BlitScaled, the surfaces are blitted correctly except for
the alpha channel.
It ends up being zero for every pixel in the dest surface, effectively
creating an empty appearing image.
When I use SDL_BlitSurface this does not happen. However, (unfortunately)
after calling
SDL_BlitScaled, all calls to SDL_BlitSurface after that create
fully-transparent images as well.

All I want is a literal blt, ie. a (scaled) copy of the source pixels with
complete disregard to
the previous contents of the destination surface.

I have attached a small 3 C source + Makefile example that blits with the
above functions
and saves the results to PNG (you can change it to BMP to see the RGB
values are still there).

Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed…
Type: application/zip
Size: 3832 bytes
Desc: not available