mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-19 19:28:28 +00:00
Fixed bug 4999 - Palette surface always promoted to alpha (Thanks Cameron Gutman!)
MSVC Static analysis: Incorrect alpha_value check in SDL_render.c (see also bug 4425)
This commit is contained in:
parent
dd1d8ab62c
commit
9a7c2b2246
1 changed files with 1 additions and 1 deletions
|
@ -1167,7 +1167,7 @@ SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)
|
|||
if (fmt->palette) {
|
||||
for (i = 0; i < fmt->palette->ncolors; i++) {
|
||||
Uint8 alpha_value = fmt->palette->colors[i].a;
|
||||
if (alpha_value != 0 || alpha_value != SDL_ALPHA_OPAQUE) {
|
||||
if (alpha_value != 0 && alpha_value != SDL_ALPHA_OPAQUE) {
|
||||
needAlpha = SDL_TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue