vsync: choose vsync method automatically
Choose the best vsync method for the user, instead of asking them to frustratingly try every one of the options to see what works. With this commit, the `vsync` option will take only a boolean value. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
@ -993,11 +993,7 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
|
||||
|
||||
cdbus_m_opts_get_do(refresh_rate, cdbus_reply_int32);
|
||||
cdbus_m_opts_get_do(sw_opti, cdbus_reply_bool);
|
||||
if (!strcmp("vsync", target)) {
|
||||
assert(ps->o.vsync < sizeof(VSYNC_STRS) / sizeof(VSYNC_STRS[0]));
|
||||
cdbus_reply_string(ps, msg, VSYNC_STRS[ps->o.vsync]);
|
||||
return true;
|
||||
}
|
||||
cdbus_m_opts_get_do(vsync, cdbus_reply_bool);
|
||||
if (!strcmp("backend", target)) {
|
||||
assert(ps->o.backend < sizeof(BACKEND_STRS) / sizeof(BACKEND_STRS[0]));
|
||||
cdbus_reply_string(ps, msg, BACKEND_STRS[ps->o.backend]);
|
||||
|
Reference in New Issue
Block a user