Skip to content

Commit

Permalink
win32u: Support DisplayConfigGetDeviceInfo(DISPLAYCONFIG_DEVICE_INFO_…
Browse files Browse the repository at this point in the history
…GET_ADVANCED_COLOR_INFO) based on Gamescope setting.

CW-Bug-Id: #22912
  • Loading branch information
Paul Gofman committed Oct 30, 2023
1 parent b4f03ce commit 1182ef7
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion dlls/win32u/sysparams.c
Original file line number Diff line number Diff line change
Expand Up @@ -6101,11 +6101,36 @@ NTSTATUS WINAPI NtUserDisplayConfigGetDeviceInfo( DISPLAYCONFIG_DEVICE_INFO_HEAD

return STATUS_NOT_SUPPORTED;
}
case DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO:
{
DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO *info = (DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO *)packet;
const char *env;

FIXME( "DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO semi-stub.\n" );

if (packet->size < sizeof(*info))
return STATUS_INVALID_PARAMETER;

info->advancedColorSupported = 0;
info->advancedColorEnabled = 0;
info->wideColorEnforced = 0;
info->advancedColorForceDisabled = 0;
info->colorEncoding = DISPLAYCONFIG_COLOR_ENCODING_RGB;
info->bitsPerColorChannel = 8;
if ((env = getenv("DXVK_HDR")) && *env == '1')
{
TRACE( "HDR is enabled.\n" );
info->advancedColorSupported = 1;
info->advancedColorEnabled = 1;
info->bitsPerColorChannel = 10;
}

return STATUS_SUCCESS;
}
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:
Expand Down

0 comments on commit 1182ef7

Please sign in to comment.