summaryrefslogtreecommitdiffstats
path: root/video/out/gl_video.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-28 21:39:17 +0100
committerwm4 <wm4@nowhere>2013-03-28 21:46:18 +0100
commit2585baa649afdda14069aa1d20d32706bb97b8f9 (patch)
tree61192e0a31cbb9b4997543e1dc5200560b2f7794 /video/out/gl_video.c
parent8d7858dd9d10181e4cb812827f1f631d06fc779e (diff)
downloadmpv-2585baa649afdda14069aa1d20d32706bb97b8f9.tar.bz2
mpv-2585baa649afdda14069aa1d20d32706bb97b8f9.tar.xz
gl_video: use choice option type for dither-depth suboption
Replaces the numeric magic values -1 and 0 with "no" and "auto". The numeric values are still allowed for compatibility.
Diffstat (limited to 'video/out/gl_video.c')
-rw-r--r--video/out/gl_video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c
index 5b98e42d56..22f4100e9a 100644
--- a/video/out/gl_video.c
+++ b/video/out/gl_video.c
@@ -256,7 +256,8 @@ const struct m_sub_options gl_video_conf = {
{"rgba16", GL_RGBA16},
{"rgba16f", GL_RGBA16F},
{"rgba32f", GL_RGBA32F})),
- OPT_INTRANGE("dither-depth", dither_depth, 0, -1, 16),
+ OPT_CHOICE_OR_INT("dither-depth", dither_depth, 0, -1, 16,
+ ({"no", -1}, {"auto", 0})),
OPT_FLAG("alpha", enable_alpha, 0),
{0}
},