mirror of https://github.com/libsdl-org/SDL.git
SDL_windowsmodes.c: Fix MSVC builds against SDKs older than 10.0.17134.0
workaround the missing DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL enum value and DISPLAYCONFIG_SDR_WHITE_LEVEL struct. Fixes: https://github.com/libsdl-org/SDL/issues/11193 Closes: https://github.com/libsdl-org/SDL/pull/11205
This commit is contained in:
parent
b865708039
commit
9fac4b9f5f
|
|
@ -513,7 +513,12 @@ static float WIN_GetSDRWhitePoint(SDL_VideoDevice *_this, HMONITOR hMonitor)
|
||||||
float SDR_white_level = 1.0f;
|
float SDR_white_level = 1.0f;
|
||||||
|
|
||||||
if (WIN_GetMonitorPathInfo(videodata, hMonitor, &path_info)) {
|
if (WIN_GetMonitorPathInfo(videodata, hMonitor, &path_info)) {
|
||||||
DISPLAYCONFIG_SDR_WHITE_LEVEL white_level;
|
/* workarounds for https://github.com/libsdl-org/SDL/issues/11193 */
|
||||||
|
struct SDL_DISPLAYCONFIG_SDR_WHITE_LEVEL {
|
||||||
|
DISPLAYCONFIG_DEVICE_INFO_HEADER header;
|
||||||
|
ULONG SDRWhiteLevel;
|
||||||
|
} white_level;
|
||||||
|
#define DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL 11
|
||||||
|
|
||||||
SDL_zero(white_level);
|
SDL_zero(white_level);
|
||||||
white_level.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL;
|
white_level.header.type = DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue