diff options
author | wm4 <wm4@nowhere> | 2013-03-06 00:24:34 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-06 00:24:34 +0100 |
commit | a1a9dc9c850f6e99103e34f1ed8e66fdc9d2012c (patch) | |
tree | 59d1833408b0682f8658a3751b6ee4940918f6ad /video/out/vo_sdl.c | |
parent | 3a0d647e0fd773a1ddd535ef21301b9f3d1fb58f (diff) | |
download | mpv-a1a9dc9c850f6e99103e34f1ed8e66fdc9d2012c.tar.bz2 mpv-a1a9dc9c850f6e99103e34f1ed8e66fdc9d2012c.tar.xz |
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.
Diffstat (limited to 'video/out/vo_sdl.c')
-rw-r--r-- | video/out/vo_sdl.c | 13 |
1 files changed, 6 insertions, 7 deletions
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, |