Jelajahi Sumber

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.
jpark37 6 tahun lalu
induk
melakukan
1ce61c57c0
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      plugins/win-capture/duplicator-monitor-capture.c

+ 1 - 1
plugins/win-capture/duplicator-monitor-capture.c

@@ -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;