From 244c23140dbe6916ab63fd908a4a8eecd3bb4049 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 25 Feb 2019 00:48:51 +0000 Subject: [PATCH] Remove the ability to change vsync method via dbus Supporting this will complicate the new backends. Signed-off-by: Yuxuan Shui --- src/dbus.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/dbus.c b/src/dbus.c index 3cfd5d1..6ddd9bb 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -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;