Parcourir la source

Fix condition for setting HDR properties

(cherry picked from commit a05aca51ec41324a44abb7a89522c571d6c594c7)
Mathieu Eyraud il y a 1 mois
Parent
commit
688637eca8
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/video/SDL_video.c

+ 1 - 1
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));