diff options
author | Christoph Heinrich <christoph.heinrich@student.tugraz.at> | 2023-02-20 04:32:50 +0100 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-02-21 17:15:17 +0000 |
commit | 91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29 (patch) | |
tree | 448b141d92c9ea7636954213b587aaf380fc21db /video/out/vo_sdl.c | |
parent | b9850a6e8c45f95563a703af7f21dfe1c1ee40b6 (diff) | |
download | mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.bz2 mpv-91cc0d8cf6a2cf264c243ca3b3e99b5fd4044c29.tar.xz |
options: transition options from OPT_FLAG to OPT_BOOL
c78482045444c488bb7948305d583a55d17cd236 introduced a bool option type
as a replacement for the flag type, but didn't actually transition and
remove the flag type because it would have been too much mundane work.
Diffstat (limited to 'video/out/vo_sdl.c')
-rw-r--r-- | video/out/vo_sdl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/video/out/vo_sdl.c b/video/out/vo_sdl.c index d47f31df11..4e2c20a681 100644 --- a/video/out/vo_sdl.c +++ b/video/out/vo_sdl.c @@ -192,9 +192,9 @@ struct priv { struct m_config_cache *opts_cache; // options - int allow_sw; - int switch_mode; - int vsync; + bool allow_sw; + bool switch_mode; + bool vsync; }; static bool lock_texture(struct vo *vo, struct mp_image *texmpi) @@ -240,7 +240,7 @@ static bool lock_texture(struct vo *vo, struct mp_image *texmpi) } static bool is_good_renderer(SDL_RendererInfo *ri, - const char *driver_name_wanted, int allow_sw, + const char *driver_name_wanted, bool allow_sw, struct formatmap_entry *osd_format) { if (driver_name_wanted && driver_name_wanted[0]) @@ -975,13 +975,12 @@ const struct vo_driver video_out_sdl = { .priv_size = sizeof(struct priv), .priv_defaults = &(const struct priv) { .renderer_index = -1, - .vsync = 1, - .screensaver_enabled = false, + .vsync = true, }, .options = (const struct m_option []){ - {"sw", OPT_FLAG(allow_sw)}, - {"switch-mode", OPT_FLAG(switch_mode)}, - {"vsync", OPT_FLAG(vsync)}, + {"sw", OPT_BOOL(allow_sw)}, + {"switch-mode", OPT_BOOL(switch_mode)}, + {"vsync", OPT_BOOL(vsync)}, {NULL} }, .preinit = preinit, |