未验证 提交 76ea0336 编写于 作者: J Jim 提交者: GitHub

Merge pull request #2882 from RytoEX/log-window-capture-method

win-capture: Log window capture method
......@@ -122,6 +122,24 @@ choose_method(enum window_capture_method method, bool wgc_supported,
return METHOD_BITBLT;
}
static const char *get_method_name(int method)
{
const char *method_name = "";
switch (method) {
case METHOD_AUTO:
method_name = "Automatic";
break;
case METHOD_BITBLT:
method_name = "BitBlt";
break;
case METHOD_WGC:
method_name = "WGC";
break;
}
return method_name;
}
static void update_settings(struct window_capture *wc, obs_data_t *s)
{
int method = (int)obs_data_get_int(s, "method");
......@@ -134,20 +152,23 @@ static void update_settings(struct window_capture *wc, obs_data_t *s)
build_window_strings(window, &wc->class, &wc->title, &wc->executable);
if (wc->title != NULL) {
blog(LOG_INFO,
"[window-capture: '%s'] update settings:\n"
"\texecutable: %s",
obs_source_get_name(wc->source), wc->executable);
blog(LOG_DEBUG, "\tclass: %s", wc->class);
}
wc->method = choose_method(method, wc->wgc_supported, wc->class);
wc->priority = (enum window_priority)priority;
wc->cursor = obs_data_get_bool(s, "cursor");
wc->use_wildcards = obs_data_get_bool(s, "use_wildcards");
wc->compatibility = obs_data_get_bool(s, "compatibility");
wc->client_area = obs_data_get_bool(s, "client_area");
if (wc->title != NULL) {
blog(LOG_INFO,
"[window-capture: '%s'] update settings:\n"
"\texecutable: %s\n"
"\tmethod selected: %s\n"
"\tmethod chosen: %s\n",
obs_source_get_name(wc->source), wc->executable,
get_method_name(method), get_method_name(wc->method));
blog(LOG_DEBUG, "\tclass: %s", wc->class);
}
}
/* ------------------------------------------------------------------------- */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册