Don't update video of sources if not displaying
This is a bit of an optimization to reduce load a little bit if any of the video capture sources are not currently being displayed on the screen. They will simply not capture or update their texture data if they are not currently being shown anywhere. The mac and window game capture sources don't really apply due to the fact that their textures aren't updated on the source's end (they update inside of the hooks).
This commit is contained in:
@@ -143,6 +143,9 @@ static void monitor_capture_tick(void *data, float seconds)
|
||||
{
|
||||
struct monitor_capture *capture = data;
|
||||
|
||||
if (!obs_source_showing(capture->source))
|
||||
return;
|
||||
|
||||
obs_enter_graphics();
|
||||
dc_capture_capture(&capture->data, NULL);
|
||||
obs_leave_graphics();
|
||||
|
Reference in New Issue
Block a user