Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from CrystalP/drfix-d3dswapeffect

Pick D3D swap effect based on the dirty regions algorithm
  • Loading branch information...
commit daf9d82867f625b25881d75a2b4092fffc1d41cb 2 parents 29ff881 + 5f42e64
@theuni authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 xbmc/rendering/dx/RenderSystemDX.cpp
View
7 xbmc/rendering/dx/RenderSystemDX.cpp
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.