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.
This commit is contained in:
jp9000
2016-08-08 04:52:48 -07:00
parent a576439f22
commit 2c531f04df

View File

@@ -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;