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

# 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](https://docs.xbox.com/reference/system/xdisplay/functions/xdisplaytryenablehdrmode.md) 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](https://docs.xbox.com/reference/system/xdisplay/structs/xdisplayhdrmodeinfo.md) 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](https://docs.xbox.com/reference/system/xdisplay/structs/xdisplayhdrmodeinfo.md) 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](https://docs.xbox.com/reference/system/xdisplay/structs/xdisplayhdrmodeinfo.md)\
[XDisplayTryEnableHdrMode](https://docs.xbox.com/reference/system/xdisplay/functions/xdisplaytryenablehdrmode.md)\
[XDisplay](https://docs.xbox.com/reference/system/xdisplay/xdisplay_members.md)


## Related topics

- [XDisplayTryEnableHdrMode](https://docs.xbox.com/reference/system/xdisplay/functions/xdisplaytryenablehdrmode.md)
- [XDisplayHdrModeInfo](https://docs.xbox.com/reference/system/xdisplay/structs/xdisplayhdrmodeinfo.md)
- [XDisplay (API contents)](https://docs.xbox.com/reference/system/xdisplay/xdisplay_members.md)
- [XDisplayHdrModePreference](https://docs.xbox.com/reference/system/xdisplay/enums/xdisplayhdrmodepreference.md)
- [Screen Capture (wdcapture.exe)](https://docs.xbox.com/tools/tools-pc/commandlinetools/gr-wdCapture.md)
