mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(D3D11/12) Reduce lag with WaitForVBlank
This commit is contained in:
parent
a5d145e211
commit
31a43b9390
@ -2374,6 +2374,14 @@ static bool d3d11_gfx_frame(
|
||||
#endif
|
||||
|
||||
DXGIPresent(d3d11->swapChain, d3d11->swap_interval, present_flags);
|
||||
|
||||
if (vsync)
|
||||
{
|
||||
IDXGIOutput *pOutput;
|
||||
DXGIGetContainingOutput(d3d11->swapChain, &pOutput);
|
||||
DXGIWaitForVBlank(pOutput);
|
||||
}
|
||||
|
||||
Release(rtv);
|
||||
|
||||
return true;
|
||||
|
@ -2660,6 +2660,13 @@ static bool d3d12_gfx_frame(
|
||||
#endif
|
||||
DXGIPresent(d3d12->chain.handle, sync_interval, present_flags);
|
||||
|
||||
if (vsync)
|
||||
{
|
||||
IDXGIOutput *pOutput;
|
||||
DXGIGetContainingOutput(d3d12->chain.handle, &pOutput);
|
||||
DXGIWaitForVBlank(pOutput);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user