• Sam Lantinga's avatar
    From: "Alex Volkov" · 3f36d970
    Sam Lantinga authored
    Date: Thu, 10 Nov 2005 21:53:40 -0500
    Subject: [SDL] BUG[?]: 32bpp RGBA->RGB colorkey blit, no SDL_SRCALPHA
    
    It seems there is either a documentation vs. reality mismatch or a real bug
    in SDL_blit_N.c:BlitNtoNKey().
    The exact blit in question is a 32bpp RGBA->RGB, where RGBA has SDL_COLORKEY
    and *no* SDL_SRCALPHA flags. The doc in SDL_video.h states:
    * RGBA->RGB:
    *     SDL_SRCALPHA not set:
    *       copy RGB.
    *       if SDL_SRCCOLORKEY set, only copy the pixels matching the
    *       RGB values of the source colour key, ignoring alpha in the
    *       comparison.
    
    BlitNtoNKey(), however, forgets to "ignore alpha in the comparison". The
    documentation makes perfect sense, so I think it is the code that is faulty.
    
    The attached patch corrects the code.
    
    --HG--
    extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401547
    3f36d970
Name
Last commit
Last update
..
audio Loading commit data...
cdrom Loading commit data...
cpuinfo Loading commit data...
events Loading commit data...
file Loading commit data...
hermes Loading commit data...
joystick Loading commit data...
loadso Loading commit data...
main Loading commit data...
stdlib Loading commit data...
thread Loading commit data...
timer Loading commit data...
video Loading commit data...
.cvsignore Loading commit data...
SDL.c Loading commit data...
SDL_error.c Loading commit data...
SDL_error_c.h Loading commit data...
SDL_fatal.c Loading commit data...
SDL_fatal.h Loading commit data...