mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
Fixed SDL_COLORSPACE_SRGB_LINEAR being used for RGBA32 textures
This commit is contained in:
parent
1c77304ee9
commit
33c70af2f8
1 changed files with 2 additions and 1 deletions
|
|
@ -1587,7 +1587,8 @@ SDL_Texture *SDL_CreateTextureWithProperties(SDL_Renderer *renderer, SDL_Propert
|
|||
SDL_SetNumberProperty(native_props, SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER, SDL_COLORSPACE_JPEG);
|
||||
} else {
|
||||
default_colorspace = SDL_GetDefaultColorspaceForFormat(closest_format);
|
||||
if (SDL_COLORSPACETYPE(texture->colorspace) == SDL_COLORSPACETYPE(default_colorspace)) {
|
||||
if (SDL_COLORSPACETYPE(texture->colorspace) == SDL_COLORSPACETYPE(default_colorspace) &&
|
||||
SDL_COLORSPACETRANSFER(texture->colorspace) == SDL_COLORSPACETRANSFER(default_colorspace)) {
|
||||
SDL_SetNumberProperty(native_props, SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER, texture->colorspace);
|
||||
} else {
|
||||
SDL_SetNumberProperty(native_props, SDL_PROP_TEXTURE_CREATE_COLORSPACE_NUMBER, default_colorspace);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue