Skip to content

Commit

Permalink
Revert "Fix FPS deviation in DirectX (Kenix3#530)"
Browse files Browse the repository at this point in the history
This reverts commit fbf310e.
  • Loading branch information
garrettjoecox committed May 15, 2024
1 parent 0da318c commit 9a5de1c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/graphic/Fast3D/gfx_dxgi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,12 +699,13 @@ static void gfx_dxgi_swap_buffers_begin(void) {
li.QuadPart = -left;
SetWaitableTimer(dxgi.timer, &li, 0, nullptr, nullptr, false);
WaitForSingleObject(dxgi.timer, INFINITE);

do {
YieldProcessor();
QueryPerformanceCounter(&t);
t.QuadPart = qpc_to_100ns(t.QuadPart);
} while (t.QuadPart < next);
}
do {
YieldProcessor();
QueryPerformanceCounter(&t);
t.QuadPart = qpc_to_100ns(t.QuadPart);
} while (t.QuadPart < next);
}
QueryPerformanceCounter(&t);
dxgi.previous_present_time = t;
Expand Down

0 comments on commit 9a5de1c

Please sign in to comment.