summaryrefslogtreecommitdiffstats
path: root/input/cmd.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-11-23 01:09:09 +0100
committerwm4 <wm4@nowhere>2019-11-23 01:18:49 +0100
commit2dc6b27ee7715cc7d50944a5bbde0a4d3e97771a (patch)
tree7b345680aee05968ed2f8c850d77ceae127aedf6 /input/cmd.h
parentf379cf0bf89ca369e6cea957ef20e9e6579ec230 (diff)
downloadmpv-2dc6b27ee7715cc7d50944a5bbde0a4d3e97771a.tar.bz2
mpv-2dc6b27ee7715cc7d50944a5bbde0a4d3e97771a.tar.xz
input: export input.conf comments ot input-bindings property
This is supposed to turn input.conf comments into inline documentation. Whether this will be useful depends on whether there'll be a script using this field. This changes a small aspect of input.conf parsing fundamentally: this attempts to strip comments/whitespace from the command string, which will later be used to generate the command when a key binding is executed. This should not have any negative effects, but there could be unknown bugs. (For some reason, every command is parsed when input.conf is parsed, but it still only stores the string for the command. I guess that saves some minor amount of memory.)
Diffstat (limited to 'input/cmd.h')
-rw-r--r--input/cmd.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/input/cmd.h b/input/cmd.h
index 72824dffc8..c63e0bdd6c 100644
--- a/input/cmd.h
+++ b/input/cmd.h
@@ -100,6 +100,7 @@ typedef struct mp_cmd {
int nargs;
int flags; // mp_cmd_flags bitfield
char *original;
+ char *desc; // (usually NULL since stripped away later)
char *input_section;
bool is_up_down : 1;
bool is_up : 1;