Xenoprimate
Xenoprimate

Reputation: 7963

Which refresh rate should I use from GetDisplayModeList?

DirectX 'returns' multiple 'matching' display modes from this call:

dxgiAdapterOutput->GetDisplayModeList(DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_ENUM_MODES_INTERLACED, &numDisplayModes, displayModeList);

I printed out all the matching modes that also match my resolution:

17.20:34+443 Mode 51: Size => 1920x1080, Refresh Rate => 50000/1000

17.20:34+443 Mode 52: Size => 1920x1080, Refresh Rate => 50000/1000

17.20:34+443 Mode 53: Size => 1920x1080, Refresh Rate => 59940/1000

17.20:34+443 Mode 54: Size => 1920x1080, Refresh Rate => 59940/1000

17.20:34+443 Mode 55: Size => 1920x1080, Refresh Rate => 60000/1001

17.20:34+443 Mode 56: Size => 1920x1080, Refresh Rate => 60000/1001

So which numerator / denominator pair is the 'right' one to pass to the swap chain?

Upvotes: 0

Views: 1400

Answers (1)

MooseBoys
MooseBoys

Reputation: 6783

If you are creating a windowed swap-chain, the refresh rate is ignored, and the OS will continue using whatever the current system refresh rate is. If you are creating a full-screen swap-chain, you can select any of the valid modes returned by the API - whatever you prefer. Note however that if your selected mode differs from the current system display mode, you will trigger a "mode change" which results in a visible flicker of the display.

The reason the API returns multiple identical modes is likely due to a display driver bug.

Upvotes: 2

Related Questions