From a1a9dc9c850f6e99103e34f1ed8e66fdc9d2012c Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 6 Mar 2013 00:24:34 +0100 Subject: options: remove --no-vsync Latest nvidia drivers ignore the application setting, so this switch makes even less sense than before. It's still possible to control this with VO specific suboptions. --- DOCS/man/en/options.rst | 3 --- core/cfg-mplayer.h | 2 -- core/defaultopts.c | 1 - core/options.h | 1 - video/out/vo_opengl.c | 2 +- video/out/vo_opengl_old.c | 2 +- video/out/vo_sdl.c | 13 ++++++------- 7 files changed, 8 insertions(+), 16 deletions(-) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 43482b5c70..873366da22 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -2341,9 +2341,6 @@ Set the startup volume. A value of -1 (the default) will not change the volume. See also ``--softvol``. ---no-vsync - Tries to disable vsync. (Effective with some video outputs only.) - --wid= (X11 and win32 only) This tells mpv to attach to an existing window. The ID is interpreted as diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h index af01a999d1..5de4050f89 100644 --- a/core/cfg-mplayer.h +++ b/core/cfg-mplayer.h @@ -570,8 +570,6 @@ const m_option_t mplayer_opts[]={ OPT_INTRANGE("fsmode-dontuse", vo.fsmode, 0, 31, 4096), OPT_INT("colorkey", vo.colorkey, 0), OPT_INT("no-colorkey", vo.colorkey, 0x1000000), - // wait for v-sync (gl) - OPT_FLAG("vsync", vo.vsync, 1), OPT_FLOATRANGE("panscan", vo.panscan, 0, 1.0, 99.0), OPT_FLOATRANGE("panscanrange", vo.panscanrange, 0, -19.0, 99.0), OPT_FLAG("force-rgba-osd-rendering", force_rgba_osd, 0), diff --git a/core/defaultopts.c b/core/defaultopts.c index 859e50d855..ca01ba1df3 100644 --- a/core/defaultopts.c +++ b/core/defaultopts.c @@ -25,7 +25,6 @@ void set_default_mplayer_options(struct MPOpts *opts) .fs = false, .screen_id = -1, .fsscreen_id = -1, - .vsync = 1, .stop_screensaver = 1, .nomouse_input = 0, .fsmode = 0, diff --git a/core/options.h b/core/options.h index 3d4c05bcc1..a6724959aa 100644 --- a/core/options.h +++ b/core/options.h @@ -11,7 +11,6 @@ typedef struct mp_vo_opts { int screenheight; int ontop; bool fs; - int vsync; int screen_id; int fsscreen_id; int stop_screensaver; diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index dbaede4461..a53a1c90d2 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -2085,7 +2085,7 @@ static int preinit(struct vo *vo, const char *arg) .colorspace = MP_CSP_DETAILS_DEFAULTS, .use_npot = 1, .use_pbo = hq, - .swap_interval = vo->opts->vsync, + .swap_interval = 1, .dither_depth = hq ? 0 : -1, .fbo_format = hq ? GL_RGB16 : GL_RGB, .use_scale_sep = 1, diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c index 7841d097d3..84ac1a1a4b 100644 --- a/video/out/vo_opengl_old.c +++ b/video/out/vo_opengl_old.c @@ -2113,7 +2113,7 @@ static int preinit(struct vo *vo, const char *arg) .use_rectangle = -1, .ati_hack = -1, .force_pbo = -1, - .swap_interval = vo->opts->vsync, + .swap_interval = 1, .custom_prog = NULL, .custom_tex = NULL, .custom_tlin = 1, diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index e59ef0472b..fa9b593b55 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -197,6 +197,7 @@ struct priv { // options int allow_sw; int switch_mode; + int vsync; }; static bool is_good_renderer(SDL_RendererInfo *ri, @@ -771,12 +772,8 @@ static int preinit(struct vo *vo, const char *arg) SDL_HINT_DEFAULT); // predefine MPV options (SDL env vars shall be overridden) - if (vo->opts->vsync) - SDL_SetHintWithPriority(SDL_HINT_RENDER_VSYNC, "1", - SDL_HINT_OVERRIDE); - else - SDL_SetHintWithPriority(SDL_HINT_RENDER_VSYNC, "0", - SDL_HINT_OVERRIDE); + SDL_SetHintWithPriority(SDL_HINT_RENDER_VSYNC, vc->vsync ? "1" : "0", + SDL_HINT_OVERRIDE); if (SDL_InitSubSystem(SDL_INIT_VIDEO)) { mp_msg(MSGT_VO, MSGL_ERR, "[sdl] SDL_Init failed\n"); @@ -1025,11 +1022,13 @@ const struct vo_driver video_out_sdl = { }, .priv_size = sizeof(struct priv), .priv_defaults = &(const struct priv) { - .renderer_index = -1 + .renderer_index = -1, + .vsync = 1, }, .options = (const struct m_option []){ OPT_FLAG("sw", allow_sw, 0), OPT_FLAG("switch-mode", switch_mode, 0), + OPT_FLAG("vsync", vsync, 0), {NULL} }, .preinit = preinit, -- cgit v1.2.3