Skip to content

Commit

Permalink
Merge pull request #1 from CrystalP/drfix-d3dswapeffect
Browse files Browse the repository at this point in the history
Pick D3D swap effect based on the dirty regions algorithm
  • Loading branch information
theuni committed Oct 16, 2011
2 parents 29ff881 + 5f42e64 commit daf9d82
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xbmc/rendering/dx/RenderSystemDX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ void CRenderSystemDX::BuildPresentParameters()

ZeroMemory( &m_D3DPP, sizeof(D3DPRESENT_PARAMETERS) );
m_D3DPP.Windowed = m_useWindowedDX;
m_D3DPP.SwapEffect = D3DSWAPEFFECT_FLIP;
// Use the most efficient flip mode for the dirty region algorithms that do not require backbuffers to be preserved.
if ( g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ALWAYS
|| g_advancedSettings.m_guiAlgorithmDirtyRegions == DIRTYREGION_SOLVER_FILL_VIEWPORT_ON_CHANGE)
m_D3DPP.SwapEffect = D3DSWAPEFFECT_DISCARD;
else
m_D3DPP.SwapEffect = D3DSWAPEFFECT_FLIP;
m_D3DPP.BackBufferCount = 2;

if(m_useD3D9Ex && (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 1 || osvi.dwMajorVersion > 6))
Expand Down

0 comments on commit daf9d82

Please sign in to comment.