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. --- video/out/vo_opengl.c | 2 +- video/out/vo_opengl_old.c | 2 +- video/out/vo_sdl.c | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'video') 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