Skip to content

Commit fafc9f6

Browse files
committed
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.
1 parent 2b374e6 commit fafc9f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/video/windows/SDL_windowsmodes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,8 @@ static void WIN_AddDisplay(SDL_VideoDevice *_this, HMONITOR hMonitor, const MONI
561561
SDL_SetDisplayContentScale(existing_display, content_scale);
562562
#ifdef HAVE_DXGI1_6_H
563563
WIN_GetHDRProperties(_this, hMonitor, &HDR);
564-
#endif
565564
SDL_SetDisplayHDRProperties(existing_display, &HDR);
565+
#endif
566566
}
567567
goto done;
568568
}

0 commit comments

Comments
 (0)