Remove the ability to change vsync method via dbus

Supporting this will complicate the new backends.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-02-25 00:48:51 +00:00
parent b76ff9fe5b
commit 244c23140d
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 0 additions and 31 deletions

View File

@ -1189,37 +1189,6 @@ cdbus_process_opts_set(session_t *ps, DBusMessage *msg) {
goto cdbus_process_opts_set_success;
}
// vsync
if (!strcmp("vsync", target)) {
const char * val = NULL;
if (!cdbus_msg_get_arg(msg, 1, DBUS_TYPE_STRING, &val))
return false;
vsync_deinit(ps);
auto tmp_vsync = parse_vsync(val);
if (tmp_vsync >= NUM_VSYNC) {
log_error("Failed to parse vsync: invalid value %s.", val);
cdbus_reply_err(ps, msg, CDBUS_ERROR_BADARG, CDBUS_ERROR_BADARG_S, 1,
"Value invalid.");
return true;
}
auto old_vsync = ps->o.vsync;
ps->o.vsync = tmp_vsync;
if (!vsync_init(ps)) {
// Trying to revert back to original vsync values
log_error("Failed to initialize specified VSync method.");
ps->o.vsync = old_vsync;
if (!vsync_init(ps)) {
log_error("Failed to revert back to original VSync method.");
ps->o.vsync = VSYNC_NONE;
}
cdbus_reply_err(ps, msg, CDBUS_ERROR_CUSTOM, CDBUS_ERROR_CUSTOM_S,
"Failed to initialize specified VSync method.");
} else
goto cdbus_process_opts_set_success;
return true;
}
// redirected_force
if (!strcmp("redirected_force", target)) {
cdbus_enum_t val = UNSET;