Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix blits of RGB+alpha->RGBA or RGB+alpha+colorkey->RGB.
I believe the problem is inherent in the way SDL2 defines SDL_BLENDMODE_BLEND to not update the destination's alpha channel. To work around this, when in one of these problem cases, we first blit to a new surace (using BLENDMODE_NONE, which does update alpha), and then use the pygame alpha blit to update the real destination. This is slower, but these should be relatively rare cases - this never happens with SRCALPHA on the source, and doesn't happen with RGB->RGB, RGB+alpha->RGB, or RGB+colorkey->RGB, which are the most common RGB blits in real games. Fixes #24, hopefully.
- Loading branch information