Explorar o código

win-capture: Don't hook game if source not showing

jp9000 %!s(int64=10) %!d(string=hai) anos
pai
achega
7c39eb4ea4
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      plugins/win-capture/game-capture.c

+ 5 - 0
plugins/win-capture/game-capture.c

@@ -1282,6 +1282,11 @@ static void game_capture_tick(void *data, float seconds)
 	gc->retry_time += seconds;
 
 	if (!gc->active) {
+		if (!obs_source_showing(gc->source)) {
+			gc->retry_time = 0.0f;
+			return;
+		}
+
 		if (!gc->error_acquiring &&
 		    gc->retry_time > gc->retry_interval) {
 			if (gc->config.capture_any_fullscreen ||