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:
parent
186fd0311d
commit
059d989bf6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user