From: Brendan Shanks bshanks@codeweavers.com
--- dlls/user32/tests/monitor.c | 2 +- dlls/win32u/sysparams.c | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index db481029f32..69a46faba28 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -2039,7 +2039,7 @@ static void test_QueryDisplayConfig_result(UINT32 flags, color_info.header.adapterId = pi[i].targetInfo.adapterId; color_info.header.id = pi[i].targetInfo.id; ret = pDisplayConfigGetDeviceInfo(&color_info.header); - todo_wine ok(!ret || broken(ret == ERROR_INVALID_PARAMETER) /* before Win10 1709 */, + ok(!ret || broken(ret == ERROR_INVALID_PARAMETER) /* before Win10 1709 */, "Expected 0, got %ld\n", ret);
/* Check corresponding modes */ diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index e7e07c76638..92ac330847d 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -7767,11 +7767,42 @@ NTSTATUS WINAPI NtUserDisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEAD unlock_display_devices(); return ret; } + case DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO: + { + DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO *color_info = (DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO *)packet; + struct monitor *monitor; + + FIXME( "DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO semi-stub.\n" ); + + if (packet->size < sizeof(*color_info)) + return STATUS_INVALID_PARAMETER; + + if (!lock_display_devices( FALSE )) return STATUS_UNSUCCESSFUL; + + LIST_FOR_EACH_ENTRY(monitor, &monitors, struct monitor, entry) + { + if (color_info->header.id != monitor->output_id) continue; + if (memcmp( &color_info->header.adapterId, &monitor->source->gpu->luid, + sizeof(monitor->source->gpu->luid) )) + continue; + + color_info->advancedColorSupported = 0; + color_info->advancedColorEnabled = 0; + color_info->wideColorEnforced = 0; + color_info->advancedColorForceDisabled = 0; + color_info->colorEncoding = DISPLAYCONFIG_COLOR_ENCODING_RGB; + color_info->bitsPerColorChannel = 8; + ret = STATUS_SUCCESS; + break; + } + + unlock_display_devices(); + return ret; + } case DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE: case DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_BASE_TYPE: case DISPLAYCONFIG_DEVICE_INFO_GET_SUPPORT_VIRTUAL_RESOLUTION: case DISPLAYCONFIG_DEVICE_INFO_SET_SUPPORT_VIRTUAL_RESOLUTION: - case DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO: case DISPLAYCONFIG_DEVICE_INFO_SET_ADVANCED_COLOR_STATE: case DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL: default: