Skip to content

Commit

Permalink
(D3D11+12) Improve 'Max Frame Latency' logging (#15911)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos authored Nov 15, 2023
1 parent bbe7afc commit 2463188
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion gfx/drivers/d3d11.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,10 @@ static bool d3d11_init_swapchain(d3d11_video_t* d3d11,

DXGISetMaximumFrameLatency(d3d11->swapChain, max_latency);
DXGIGetMaximumFrameLatency(d3d11->swapChain, &cur_latency);
RARCH_LOG("[D3D11]: Requesting %u maximum frame latency, using %u.\n", max_latency, cur_latency);
RARCH_LOG("[D3D11]: Requesting %u maximum frame latency, using %u%s.\n",
settings->uints.video_max_frame_latency,
cur_latency,
(d3d11->flags & D3D11_ST_FLAG_WAIT_FOR_VBLANK) ? " with WaitForVBlank" : "");
}

#ifdef HAVE_DXGI_HDR
Expand Down
5 changes: 4 additions & 1 deletion gfx/drivers/d3d12.c
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,10 @@ static bool d3d12_init_swapchain(d3d12_video_t* d3d12,

DXGISetMaximumFrameLatency(d3d12->chain.handle, max_latency);
DXGIGetMaximumFrameLatency(d3d12->chain.handle, &cur_latency);
RARCH_LOG("[D3D12]: Requesting %u maximum frame latency, using %u.\n", max_latency, cur_latency);
RARCH_LOG("[D3D12]: Requesting %u maximum frame latency, using %u%s.\n",
settings->uints.video_max_frame_latency,
cur_latency,
(d3d12->flags & D3D12_ST_FLAG_WAIT_FOR_VBLANK) ? " with WaitForVBlank" : "");
}

#ifdef HAVE_WINDOW
Expand Down

0 comments on commit 2463188

Please sign in to comment.