SDL_CreateWindowTexture() shouldn't use 10-bit or float textures
parent
696ecca499
commit
35785d1354
|
@ -314,9 +314,12 @@ static int SDL_CreateWindowTexture(SDL_VideoDevice *_this, SDL_Window *window, S
|
||||||
*format = info.texture_formats[0];
|
*format = info.texture_formats[0];
|
||||||
|
|
||||||
for (i = 0; i < info.num_texture_formats; ++i) {
|
for (i = 0; i < info.num_texture_formats; ++i) {
|
||||||
if (!SDL_ISPIXELFORMAT_FOURCC(info.texture_formats[i]) &&
|
SDL_PixelFormatEnum texture_format = info.texture_formats[i];
|
||||||
transparent == SDL_ISPIXELFORMAT_ALPHA(info.texture_formats[i])) {
|
if (!SDL_ISPIXELFORMAT_FOURCC(texture_format) &&
|
||||||
*format = info.texture_formats[i];
|
!SDL_ISPIXELFORMAT_10BIT(texture_format) &&
|
||||||
|
!SDL_ISPIXELFORMAT_FLOAT(texture_format) &&
|
||||||
|
transparent == SDL_ISPIXELFORMAT_ALPHA(texture_format)) {
|
||||||
|
*format = texture_format;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue