title: Forcing DirectX 11 VSync, even if turned off in Nvidia control panel
body: <p>Some users of my DirectX 11 application complains about frame rates between 1000-2000 fps, which I totally understand. It's a really small group of people who have had this issue. The only way I've been able to replicate it is by disabling 'Vertical sync' in the Nvidia control panel and I suspect that users may have tampered with these settings, maybe to solve issues for other applications earlier (or Nvidia application decides this is most suitable for the application?).</p>
  <p>I currently loop through the <code>DisplayModeList</code> from <code>IDXGIOutput::GetDisplayModeList</code> to find the best suitable <code>RefreshRate</code> to assign to the <code>DXGI_SWAP_CHAIN_DESC</code> before calling <code>D3D11CreateDeviceAndSwapChain()</code>.</p>
  <pre><code>swapChainDesc.BufferDesc.RefreshRate.Numerator = numerator;
  swapChainDesc.BufferDesc.RefreshRate.Denominator = denominator;
  </code></pre>
  <p>Although, even if I set the numerator and denominator to 0 and 1, respectively, the driver will use VSync and run the application at an appropriate frame rate (monitor frame rate). This is using the default settings in Nvidia control panel.</p>
  <p>It seems that no video display mode or swapchain creation settings can ignore the fact that VSync is disabled in the Nvidia control panel. Same issue in OpenGL using GLFW.</p>
  <p>A workaround is to let the application sleep when the delta time is really small, but the sleep is not guaranteed to be accurate and would cause fps jitter and screen tearing.</p>
  <p>Is there any way for me to override the setting in the Nvidia control panel?</p>