Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Don't accidentally pick a YV12 format as the closest format.

  • Loading branch information
slouken committed Feb 15, 2011
1 parent 1d354b4 commit 56493dddf5488845f640b8ca94d170794599dad4
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/render/SDL_render.c
@@ -244,7 +244,8 @@ GetClosestSupportedFormat(SDL_Renderer * renderer, Uint32 format)

/* We just want to match the first format that has the same channels */
for (i = 0; i < renderer->info.num_texture_formats; ++i) {
if (SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == hasAlpha) {
if (!SDL_ISPIXELFORMAT_FOURCC(renderer->info.texture_formats[i]) &&
SDL_ISPIXELFORMAT_ALPHA(renderer->info.texture_formats[i]) == hasAlpha) {
return renderer->info.texture_formats[i];
}
}

0 comments on commit 56493dd

Please sign in to comment.