win-capture: If backbuffer count is 1, disable dxgi 1.4 use

Executing the dxgi 1.4 code causes it to cycle through backbuffers,
backbuffers which may not exist if in discard mode.
master
jp9000 2016-12-23 08:02:35 -08:00
parent 414ff5ba14
commit 74a5bdf993
1 changed files with 3 additions and 0 deletions

View File

@ -248,6 +248,9 @@ static inline bool d3d12_init_format(IDXGISwapChain *swap, HWND &window,
bb.count = desc.SwapEffect == DXGI_SWAP_EFFECT_DISCARD
? 1 : desc.BufferCount;
if (bb.count == 1)
data.dxgi_1_4 = false;
if (bb.count > MAX_BACKBUFFERS) {
hlog("Somehow it's using more than the max backbuffers. "
"Not sure why anyone would do that.");