Don't accidentally pick a YV12 format as the closest format.
This commit is contained in:
parent
a6be4e7267
commit
c1b336b8ee
1 changed files with 2 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue