From 24f4582b6f7f57f566418551f9252b8578d2b602 Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sun, 19 Jun 2022 19:40:20 -0500 Subject: x11: add --x11-present option With the recent addition of the libxpresent, it should improve frame timings for most users. However, there were known cases of bad behavior (Nvidia) which lead to a construction of a whitelist instead of just enabling this all the time. Since there's no way to predict whatever combination of hardware/drivers/etc. may work correctly, just give users an option to switch the usage of xorg's presentation statistics on/off. The default value, auto, works like before (basically, Mesa drivers and no Nvidia are allowed), but now one can force it on/off if needed. --- options/options.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index 6d38af53b4..0b1c58d9a6 100644 --- a/options/options.c +++ b/options/options.c @@ -175,6 +175,8 @@ static const m_option_t mp_vo_opt_list[] = { {"x11-netwm", OPT_CHOICE(x11_netwm, {"auto", 0}, {"no", -1}, {"yes", 1})}, {"x11-bypass-compositor", OPT_CHOICE(x11_bypass_compositor, {"no", 0}, {"yes", 1}, {"fs-only", 2}, {"never", 3})}, + {"x11-present", OPT_CHOICE(x11_present, + {"no", 0}, {"auto", 1}, {"yes", 2})}, #endif #if HAVE_WIN32_DESKTOP {"vo-mmcss-profile", OPT_STRING(mmcss_profile)}, @@ -212,6 +214,7 @@ const struct m_sub_options vo_sub_opts = { .WinID = -1, .window_scale = 1.0, .x11_bypass_compositor = 2, + .x11_present = 1, .mmcss_profile = "Playback", .ontop_level = -1, .timing_offset = 0.050, -- cgit v1.2.3