Skip to content

Commit

Permalink
Settings changes reset the refresh timer
Browse files Browse the repository at this point in the history
  • Loading branch information
YorVeX committed Jun 10, 2023
1 parent a6018d3 commit 412fc19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions BrowserFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ 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);
context->SecondsWaited = 0; // any setting change should reset the timer

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
Expand Down

0 comments on commit 412fc19

Please sign in to comment.