1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-18 04:45:33 +00:00

options: don't allow --no-foo=yes

It's a bit strange to allow this, so get rid of it.

This probably breaks a bunch of user config files.

The client API still allows setting them with MPV_FORMAT_FLAG with a
value of 1 (i.e. true), but I guess this is tolerable.
This commit is contained in:
wm4 2014-04-14 20:40:23 +02:00
parent 186fd0311d
commit 059d989bf6

View File

@ -196,7 +196,7 @@ const m_option_type_t m_option_type_flag = {
static int parse_store(struct mp_log *log, const m_option_t *opt,
struct bstr name, struct bstr param, void *dst)
{
if (param.len == 0 || bstrcmp0(param, "yes") == 0) {
if (param.len == 0) {
if (dst)
VAL(dst) = opt->max;
return 0;
@ -235,7 +235,7 @@ const m_option_type_t m_option_type_store = {
static int parse_store_float(struct mp_log *log, const m_option_t *opt,
struct bstr name, struct bstr param, void *dst)
{
if (param.len == 0 || bstrcmp0(param, "yes") == 0) {
if (param.len == 0) {
if (dst)
VAL(dst) = opt->max;
return 0;