Commit c1b336b8 authored by Sam Lantinga's avatar Sam Lantinga

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

parent a6be4e72
......@@ -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];
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment