From d51205b174ced006aace4ac9a7d44affa0bfe872 Mon Sep 17 00:00:00 2001 From: xwidghet Date: Sun, 21 Aug 2016 05:26:09 -0700 Subject: [PATCH] Allow true vsync off when aero is on. Requires Dwmapi.lib linking. --- src/RageDisplay_D3D.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/RageDisplay_D3D.cpp b/src/RageDisplay_D3D.cpp index 7e9413bc21..3acf6acebd 100644 --- a/src/RageDisplay_D3D.cpp +++ b/src/RageDisplay_D3D.cpp @@ -17,6 +17,8 @@ #include #include +#include + #include "archutils/Win32/GraphicsWindow.h" // Static libraries @@ -474,7 +476,10 @@ static void SetPresentParametersFromVideoModeParams( const VideoModeParams &p, D pD3Dpp->EnableAutoDepthStencil = TRUE; pD3Dpp->AutoDepthStencilFormat = D3DFMT_D16; - if( p.windowed ) + BOOL aeroOn = false; + DwmIsCompositionEnabled(&aeroOn); + + if (p.windowed && !aeroOn) pD3Dpp->PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT; else pD3Dpp->PresentationInterval = p.vsync ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE;