diff options
author | wm4 <wm4@nowhere> | 2014-02-24 23:02:20 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-24 23:02:20 +0100 |
commit | 761975d47b4e8536df837f999642430d19087b79 (patch) | |
tree | 6f791d85220d027612167440cc6750a2fb42553a /input/cmd_list.h | |
parent | 0adb8a9aaf1e1c76300d717a0a3dd04849e70d1d (diff) | |
download | mpv-761975d47b4e8536df837f999642430d19087b79.tar.bz2 mpv-761975d47b4e8536df837f999642430d19087b79.tar.xz |
command: fix loadfile command
This was broken by commit bb6b543812a724. Note that the original pull
request was fine, but it was broken by my own stupidity when I was
"improving" it.
The problem is that the new loadfile argument was not considered
optional anymore after my changes. The original pull request did handle
this by setting .defval to a dummy value, but I removed that part.
Fix it again by introducing a flag that designates that the parameter is
optional. (I didn't want to add it to m_option.h, because technically,
all options are optional, and it's not possible to have non-optional
options.)
Diffstat (limited to 'input/cmd_list.h')
-rw-r--r-- | input/cmd_list.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/input/cmd_list.h b/input/cmd_list.h index e74a21921e..9a3c25018f 100644 --- a/input/cmd_list.h +++ b/input/cmd_list.h @@ -24,6 +24,8 @@ #define MP_CMD_MAX_ARGS 10 +#define MP_CMD_OPT_ARG 0x1000 + struct mp_cmd_def { int id; // one of MP_CMD_... const char *name; // user-visible name (as used in input.conf) |