Commit ba8d599c authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9, util] Add DXUP_RESPECT_VSYNC config option.

parent bcaae0af
Pipeline #39 passed with stage
in 1 minute and 36 seconds
......@@ -283,21 +283,23 @@ namespace dxup {
if (m_rtRequired && !(d3d11Flags & DXGI_PRESENT_TEST))
this->rtBlit();
UINT syncInterval;
if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE)
syncInterval = 0;
else if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_DEFAULT || m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_ONE)
syncInterval = 1;
else if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_TWO)
syncInterval = 2;
else if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_THREE)
syncInterval = 3;
else //if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_FOUR)
syncInterval = 4;
if (dwFlags & D3DPRESENT_FORCEIMMEDIATE)
syncInterval = 0;
UINT syncInterval = 0;
if (config::getBool(config::RespectVSync)) {
if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE)
syncInterval = 0;
else if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_DEFAULT || m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_ONE)
syncInterval = 1;
else if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_TWO)
syncInterval = 2;
else if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_THREE)
syncInterval = 3;
else //if (m_presentationParameters.PresentationInterval == D3DPRESENT_INTERVAL_FOUR)
syncInterval = 4;
if (dwFlags & D3DPRESENT_FORCEIMMEDIATE)
syncInterval = 0;
}
if (dwFlags & D3DPRESENT_DONOTWAIT)
d3d11Flags |= DXGI_PRESENT_DO_NOT_WAIT;
......
......@@ -63,6 +63,7 @@ namespace dxup {
initVar(var::RefactoringAllowed, "DXUP_REFACTORINGALLOWED", "1");
initVar(var::GDICompatible, "DXUP_GDI_COMPATIBLE", "0");
initVar(var::RespectVSync, "DXUP_RESPECT_VSYNC", "1");
initVar(var::UseFakes, "DXUP_USEFAKES", "0");
initVar(var::FakeDriver, "DXUP_FAKE_DRIVER", "aticfx32.dll");
initVar(var::FakeDescription, "DXUP_FAKE_DESCRIPTION", "AMD Radeon R9 200 Series");
......
......@@ -20,6 +20,7 @@ namespace dxup {
RefactoringAllowed,
GDICompatible,
RespectVSync,
UseFakes,
FakeDriver,
FakeDescription,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment