Skip to content

Commit

Permalink
Fix vertical sync issue
Browse files Browse the repository at this point in the history
  • Loading branch information
elishacloud committed Aug 25, 2018
1 parent 736f148 commit c8d4e1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions source/d3d8types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ void ConvertPresentParameters(D3DPRESENT_PARAMETERS8 &Input, D3DPRESENT_PARAMETE
Output.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
}

// D3DPRESENT_INTERVAL_DEFAULT is defined as zero and is equivalent to D3DPRESENT_INTERVAL_ONE in D3D9
if (Output.PresentationInterval == D3DPRESENT_INTERVAL_DEFAULT)
{
Output.PresentationInterval = D3DPRESENT_INTERVAL_ONE;
}

// D3DSWAPEFFECT_COPY_VSYNC is no longer supported in D3D9
if (Output.SwapEffect == D3DSWAPEFFECT_COPY_VSYNC)
{
Expand Down

0 comments on commit c8d4e1d

Please sign in to comment.