src/render/SDL_render.c
changeset 5300 3f825465a14a
parent 5297 1800dc39b74c
child 5331 16bc7591f8c8
equal deleted inserted replaced
5299:33987021a1ed 5300:3f825465a14a
   242     } else {
   242     } else {
   243         SDL_bool hasAlpha = SDL_ISPIXELFORMAT_ALPHA(format);
   243         SDL_bool hasAlpha = SDL_ISPIXELFORMAT_ALPHA(format);
   244 
   244 
   245         /* We just want to match the first format that has the same channels */
   245         /* We just want to match the first format that has the same channels */
   246         for (i = 0; i < renderer->info.num_texture_formats; ++i) {
   246         for (i = 0; i < renderer->info.num_texture_formats; ++i) {
   247             if (SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == hasAlpha) {
   247             if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
       
   248                 SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == hasAlpha) {
   248                 return renderer->info.texture_formats[i];
   249                 return renderer->info.texture_formats[i];
   249             }
   250             }
   250         }
   251         }
   251     }
   252     }
   252     return renderer->info.texture_formats[0];
   253     return renderer->info.texture_formats[0];