Fixed the colorspace for YUV textures using native RGB representations

Fixes https://github.com/libsdl-org/SDL/issues/10624
This commit is contained in:
Sam Lantinga 2024-08-29 20:51:03 -07:00
parent efc98062af
commit 16fb8e54cb
3 changed files with 7 additions and 4 deletions

View file

@ -1453,7 +1453,7 @@ SDL_Texture *SDL_CreateTextureWithProperties(SDL_Renderer *renderer, SDL_Propert
if (SDL_ISPIXELFORMAT_FOURCC(texture->format)) {
#if SDL_HAVE_YUV
texture->yuv = SDL_SW_CreateYUVTexture(format, w, h);
texture->yuv = SDL_SW_CreateYUVTexture(texture->format, texture->colorspace, w, h);
#else
SDL_SetError("SDL not built with YUV support");
#endif