Skip to content

Commit

Permalink
Fixed #2 (refreshing not starting directly after filter add)
Browse files Browse the repository at this point in the history
  • Loading branch information
YorVeX committed Jun 10, 2023
1 parent 5035587 commit a6018d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions BrowserFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ public static unsafe void filter_save(void* data, obs_data* settings)
fixed (byte* intervalId = "interval"u8)
context->RefreshIntervalSeconds = (int)ObsData.obs_data_get_int(settings, (sbyte*)intervalId);
Module.Log("Browser auto refresh interval was set to " + context->RefreshIntervalSeconds + " second(s)", ObsLogLevel.Debug);

var browserSource = Obs.obs_filter_get_parent(context->Source);
context->Active = (browserSource != null) && Convert.ToBoolean(Obs.obs_source_active(browserSource)); // this ensures any newly added filter to immediately start refreshing if the browser source is visible
}

[UnmanagedCallersOnly(CallConvs = new[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })]
Expand Down

0 comments on commit a6018d3

Please sign in to comment.