0

How can I get the status of the windows hdr/sdr switch with code?

msdn description switch button position: Select the Start button, then select Settings > System > Display . If you have multiple displays connected to your PC, choose the HDR-capable display under Select and rearrange displays. Select Windows HD Color settings. Under Display capabilities, check to make sure it says Yes next to Play HDR games and apps. Turn on Play HDR games and apps.

Why do i want to get the switch status?

I am working on an app with hdr video playback, and the encrypted content makes me have to use the dx hardware overlay. But when I use the hardware overlay and turn on the windows hdr switch, I always report error 0x8007000e:E_OUTOFMEMORY when pDirect3DDevice9Ex->PresentEx(0, 0, 0, 0, 0); Everything works fine without turning on the switch. This problem has been bothering me for a long time. Can someone tell me how to get the switch status, or solve the problem caused by the coexistence of hardware overlay and switch open state? use the direct3d9 Thank you very much sincerely.

Zhou Chen
  • 1
  • 3
  • Why are you using legacy Direct3D9Ex API? Official HDR10 output support (added in Windows 10 Creators Update) is supported through DXGI which is used for Direct3D 11/12, and is not exposed through legacy Direct3D9 or Direct3D9Ex. See [Microsoft Docs](https://support.microsoft.com/en-us/help/4040263/windows-10-hdr-advanced-color-settings) – Chuck Walbourn Sep 12 '19 at 16:38
  • The project I am working on uses dx9, and the entire project has been modified to be very large, so I feel that solving this problem will reduce the time spent.thank you. – Zhou Chen Sep 16 '19 at 01:43

0 Answers0