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_sdl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'video/out/vo_sdl.c') 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