From 2c531f04df5a5b6a6205b466f6f4715961d79e92 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 8 Aug 2016 04:52:48 -0700 Subject: [PATCH] win-capture: Fix game capture hotkey activating immediately When game capture was set to hotkey mode by the user, it would try to activate the capture right away without waiting for the user to press a hotkey. --- plugins/win-capture/game-capture.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/win-capture/game-capture.c b/plugins/win-capture/game-capture.c index 05511859c..fa755407e 100644 --- a/plugins/win-capture/game-capture.c +++ b/plugins/win-capture/game-capture.c @@ -420,9 +420,15 @@ static void game_capture_update(void *data, obs_data_t *settings) gc->error_acquiring = false; } + if (cfg.mode == CAPTURE_MODE_HOTKEY && + gc->config.mode != CAPTURE_MODE_HOTKEY) { + gc->activate_hook = false; + } else { + gc->activate_hook = !!window && !!*window; + } + free_config(&gc->config); gc->config = cfg; - gc->activate_hook = !!window && !!*window; gc->retry_interval = DEFAULT_RETRY_INTERVAL; gc->wait_for_target_startup = false;