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,
Jonas
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl_scaledblit.zip
Type: application/zip
Size: 3832 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130925/80466028/attachment.zip