mirror of
https://github.com/yawut/SDL.git
synced 2026-09-13 11:36:32 -05:00
Don't accidentally pick a YV12 format as the closest format.
This commit is contained in:
@@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user