From fafc9f642af97c9b55ffb7a0b1048326169d1fc0 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Tue, 28 May 2024 15:51:02 -0400 Subject: [PATCH] win32: Don't set the display HDR values to uninitialized data The HDR properties are zeroed and set in WIN_GetHDRProperties, and using the struct without calling this function results in sending uninitialized data. --- src/video/windows/SDL_windowsmodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowsmodes.c b/src/video/windows/SDL_windowsmodes.c index 4926ff2af4..2cca6a36b8 100644 --- a/src/video/windows/SDL_windowsmodes.c +++ b/src/video/windows/SDL_windowsmodes.c @@ -561,8 +561,8 @@ static void WIN_AddDisplay(SDL_VideoDevice *_this, HMONITOR hMonitor, const MONI SDL_SetDisplayContentScale(existing_display, content_scale); #ifdef HAVE_DXGI1_6_H WIN_GetHDRProperties(_this, hMonitor, &HDR); -#endif SDL_SetDisplayHDRProperties(existing_display, &HDR); +#endif } goto done; }