win-capture: Fix extra duplicator refs

Make duplicator_capture_tick the sole creater, and reference adder of
IDXGIOutputDuplication objects. This prevents a situation where
duplicator_capture::showing cause be false while
duplicator_capture::duplicator was not null at startup on background
scenes, preventing IDXGIOutputDuplication from being recreated when
DXGI_ERROR_ACCESS_LOST.
This commit is contained in:
jpark37 2019-10-10 19:03:18 -07:00
parent cda7f3e3fd
commit 1ce61c57c0

View File

@ -52,7 +52,7 @@ static inline void update_settings(struct duplicator_capture *capture,
obs_enter_graphics();
gs_duplicator_destroy(capture->duplicator);
capture->duplicator = gs_duplicator_create(capture->monitor);
capture->duplicator = NULL;
capture->width = 0;
capture->height = 0;
capture->x = 0;