Aman Mehta
Aman Mehta

Reputation: 23

Not getting desired refresh rate when using SetPresentDuration method

I want to set a custom refresh rate in my DX application for that I have used SetPresentDuration() method of IDXGISwapChainMedia interface, the method is returning S_OK but when I am checking the refresh rate it is not setting up as expected. Do I need to set some specific value in the flag member of DXGI_SWAP_CHAIN_DESC structure as we need DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH value in the flag if we use ResizeTarget() method for setting custom refresh rate.

hr = scMedia->SetPresentDuration ((UINT)500000); //20Hz

scMedia is a pointer of the type IDXGISwapChainMedia. S_OK is coming in hr which means this refresh rate has been set but in actual it's not.

Upvotes: 0

Views: 100

Answers (0)

Related Questions