> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XDisplayHdrModeResult

> XDisplayHdrModeResult

# XDisplayHdrModeResult

Specifies the current state of HDR (high dynamic range) support on the attached display.

## Syntax

```cpp theme={null}
enum class XDisplayHdrModeResult  : uint32_t  
{  
    Unknown = 0,  
    Enabled = 1,  
    Disabled = 2  
}  
```

## Constants

| Constant | Description                                                         |
| -------- | ------------------------------------------------------------------- |
| Unknown  | An error occurred, and the current state of HDR support is unknown. |
| Enabled  | HDR mode is enabled.                                                |
| Disabled | HDR mode is disabled.                                               |

## Remarks

The [XDisplayTryEnableHdrMode](/reference/system/xdisplay/functions/xdisplaytryenablehdrmode) function returns an **XDisplayHdrModeResult** enumeration value that indicates whether the function can enable HDR mode for the attached display. If **XDisplayHdrModeResult::Enabled** is returned, the function also provides an [XDisplayHdrModeInfo](/reference/system/xdisplay/structs/xdisplayhdrmodeinfo) structure that contains the minimum and maximum tone map luminance values for HDR mode.

The following example attempts to enable HDR mode for the attached display. If **XDisplayHdrModeInfo::Enabled** is returned, then HDR mode is enabled for the display and the game uses the luminance values from the returned [XDisplayHdrModeInfo](/reference/system/xdisplay/structs/xdisplayhdrmodeinfo) structure to initialize in HDR mode; otherwise, HDR mode is either unavailable or disabled, and the game initializes in SDR (standard dynamic range) mode.

```cpp theme={null}
void Game::InitializeHDRMode() 
{
    // Attempt to enable HDR mode, then initialize based on the 
    // result of the attempt.
    XDisplayHdrModeInfo displayModeHdrInfo;

    if (XDisplayHdrModeResult::Enabled == XDisplayTryEnableHdrMode(XDisplayHdrModePreference::PreferHdr, &displayModeHdrInfo))
    {
        // HDR mode is enabled for the attached display.
        InitializeAsHDR(
            displayModeHdrInfo.minToneMapLuminance,
            displayModeHdrInfo.maxToneMapLuminance,
            displayModeHdrInfo.maxFullFrameToneMapLuminance);
    }
    else
    {
        // Either HDR mode is disabled for the attached display, or the
        // attached display does not support HDR.
        InitializeAsSDR();
    }
}
```

## Requirements

**Header:** XDisplay.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XDisplayHdrModeInfo](/reference/system/xdisplay/structs/xdisplayhdrmodeinfo)\
[XDisplayTryEnableHdrMode](/reference/system/xdisplay/functions/xdisplaytryenablehdrmode)\
[XDisplay](/reference/system/xdisplay/xdisplay_members)


## Related topics

- [XDisplayTryEnableHdrMode](/reference/system/xdisplay/functions/xdisplaytryenablehdrmode.md)
- [XDisplayHdrModeInfo](/reference/system/xdisplay/structs/xdisplayhdrmodeinfo.md)
- [XDisplay](/reference/system/xdisplay/xdisplay_members.md)
- [XDisplayHdrModePreference](/reference/system/xdisplay/enums/xdisplayhdrmodepreference.md)
- [XR-131 Display Mode Support for Game DVR and Screenshots](/publishing/certification/xr/xr-131.md)
