Skip to content

Commit 2da06ba

Browse files
committed
Fix artifacts when vsync is off.
1 parent 2143f41 commit 2da06ba

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/d2dx/RenderContext.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -465,18 +465,13 @@ void RenderContext::Present()
465465
break;
466466
case RenderContextSyncStrategy::Interval1:
467467
D2DX_CHECK_HR(_swapChain1->Present(1, 0));
468-
/*
469-
ComPtr<IDXGIOutput> output;
470-
_swapChain1->GetContainingOutput(&output);
471-
472-
output->WaitForVBlank();*/
473-
474-
double curTime = TimeEndMs(_timeStart);
475-
_frameTimeMs = curTime - _prevTime;
476-
_prevTime = curTime;
477468
break;
478469
}
479470

471+
double curTime = TimeEndMs(_timeStart);
472+
_frameTimeMs = curTime - _prevTime;
473+
_prevTime = curTime;
474+
480475
if (_deviceContext1)
481476
{
482477
_deviceContext1->DiscardView(_resources->GetFramebufferRtv(RenderContextFramebuffer::Game));

0 commit comments

Comments
 (0)