mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-05 22:30:29 +00:00
Fixed accidentally using INDEX8 textures for RGB24 surfaces
This commit is contained in:
parent
7a49ce71a1
commit
015cc6aa6c
1 changed files with 2 additions and 1 deletions
|
|
@ -1846,7 +1846,8 @@ SDL_Texture *SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *s
|
|||
|
||||
for (i = 0; i < renderer->num_texture_formats; ++i) {
|
||||
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->texture_formats[i]) &&
|
||||
SDL_ISPIXELFORMAT_ALPHA(renderer->texture_formats[i]) == needAlpha) {
|
||||
SDL_ISPIXELFORMAT_ALPHA(renderer->texture_formats[i]) == needAlpha &&
|
||||
SDL_ISPIXELFORMAT_INDEXED(renderer->texture_formats[i]) == SDL_ISPIXELFORMAT_INDEXED(surface->format)) {
|
||||
format = renderer->texture_formats[i];
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue