Change PresentationInterval (V-Sync) option behavior to force it off:

-1 = V-Sync forced off
0 = no change
1 = forced on
This commit is contained in:
Robert Krawczyk 2021-03-11 07:40:59 +01:00
parent e15529e67e
commit f2c53b9735

View file

@ -145,10 +145,14 @@ bool MainContext::ApplyPresentationParameters(D3DPRESENT_PARAMETERS* pPresentati
PrintLog("MultiSampleType %u, MultiSampleQuality %u", pPresentationParameters->MultiSampleType, pPresentationParameters->MultiSampleQuality);
}
if (config.GetOptionsPresentationInterval() != -1)
if (config.GetOptionsPresentationInterval() != 0)
{
pPresentationParameters->PresentationInterval = config.GetOptionsPresentationInterval();
PrintLog("PresentationInterval: PresentationInterval set to %u", pPresentationParameters->PresentationInterval);
if (config.GetOptionsPresentationInterval() == -1)
pPresentationParameters->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
else if (config.GetOptionsPresentationInterval() > 0)
pPresentationParameters->PresentationInterval = D3DPRESENT_INTERVAL_ONE;
PrintLog("PresentationInterval: PresentationInterval set to 0x%x", pPresentationParameters->PresentationInterval);
}
if (config.GetOptionsSwapEffect() != -1)