win-capture: Faster display / window capture updates

When changing the target for display or window capture, force a
refresh of the source by setting the timer to fire immediately. This
removes 1-3 seconds of "lag" before the new display or window is
visible and makes the UI feel more responsive.

Closes https://github.com/obsproject/obs-studio/issues/2322
This commit is contained in:
Richard Stanway
2020-02-03 23:22:42 +01:00
parent 86d3eb3088
commit fb6936a934
2 changed files with 5 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ static inline void update_settings(struct duplicator_capture *capture,
capture->x = 0;
capture->y = 0;
capture->rot = 0;
capture->reset_timeout = 0.0f;
capture->reset_timeout = RESET_INTERVAL_SEC;
obs_leave_graphics();
}