From 688637eca8329272510b93ca1f17c2199dbaec5e Mon Sep 17 00:00:00 2001 From: Mathieu Eyraud <70028899+meyraud705@users.noreply.github.com> Date: Mon, 4 Aug 2025 11:14:52 +0200 Subject: [PATCH] Fix condition for setting HDR properties (cherry picked from commit a05aca51ec41324a44abb7a89522c571d6c594c7) --- src/video/SDL_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 0e706e6021..c019a05856 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1163,7 +1163,7 @@ float SDL_GetDisplayContentScale(SDL_DisplayID displayID) void SDL_SetWindowHDRProperties(SDL_Window *window, const SDL_HDROutputProperties *HDR, bool send_event) { - if (window->HDR.HDR_headroom != HDR->HDR_headroom || window->HDR.SDR_white_level != window->HDR.SDR_white_level) { + if (window->HDR.HDR_headroom != HDR->HDR_headroom || window->HDR.SDR_white_level != HDR->SDR_white_level) { SDL_PropertiesID window_props = SDL_GetWindowProperties(window); SDL_SetFloatProperty(window_props, SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT, SDL_max(HDR->HDR_headroom, 1.0f));