From 2a27018eda394a4e005cd8ba6bb3bfd0298809c7 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 26 Jul 2024 06:33:42 -0700 Subject: [PATCH] Updated to the latest version of SDL Fixes https://github.com/libsdl-org/SDL_image/issues/459 --- external/SDL | 2 +- src/IMG_avif.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/external/SDL b/external/SDL index c80665a6..a1a82780 160000 --- a/external/SDL +++ b/external/SDL @@ -1 +1 @@ -Subproject commit c80665a6968e6274b978846ba77b47c9c61c2618 +Subproject commit a1a82780298df6b966b8bbb5519126c80b286237 diff --git a/src/IMG_avif.c b/src/IMG_avif.c index 9f12a00b..63064ad8 100644 --- a/src/IMG_avif.c +++ b/src/IMG_avif.c @@ -468,7 +468,7 @@ SDL_Surface *IMG_LoadAVIF_IO(SDL_IOStream *src) image->transferCharacteristics, SDL_MATRIX_COEFFICIENTS_IDENTITY, SDL_CHROMA_LOCATION_NONE); - SDL_SetNumberProperty(props, SDL_PROP_SURFACE_COLORSPACE_NUMBER, colorspace); + SDL_SetSurfaceColorspace(surface, colorspace); if (image->clli.maxCLL > 0) { maxCLL = image->clli.maxCLL; SDL_SetNumberProperty(props, SDL_PROP_SURFACE_MAXCLL_NUMBER, image->clli.maxCLL); @@ -537,8 +537,8 @@ static int IMG_SaveAVIF_IO_libavif(SDL_Surface *surface, SDL_IOStream *dst, int } /* Get the colorspace and light level properties, if any */ + colorspace = SDL_GetSurfaceColorspace(surface); props = SDL_GetSurfaceProperties(surface); - colorspace = (SDL_Colorspace)SDL_GetNumberProperty(props, SDL_PROP_SURFACE_COLORSPACE_NUMBER, SDL_COLORSPACE_RGB_DEFAULT); maxCLL = (Uint16)SDL_GetNumberProperty(props, SDL_PROP_SURFACE_MAXCLL_NUMBER, 0); maxFALL = (Uint16)SDL_GetNumberProperty(props, SDL_PROP_SURFACE_MAXFALL_NUMBER, 0);