summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-09-15 01:10:59 +0200
committerwm4 <wm4@nowhere>2012-10-12 10:10:30 +0200
commit4e2fab5846d2fe7f51a799abb4118515efac854b (patch)
treefd32851eecd1f89580620d4f1ecb242ab3bb7c28 /input
parentcd25a671b58a94fbfa1942103137ad6617170a32 (diff)
downloadmpv-4e2fab5846d2fe7f51a799abb4118515efac854b.tar.bz2
mpv-4e2fab5846d2fe7f51a799abb4118515efac854b.tar.xz
commands: rename properties, update input.conf
Use "-" instead of "_" in property names. The intent is that property names and options names should be the same (if they refer to the same thing), and options use "-" as word separator. Rename some other properties too, e.g. "switch_audio" -> "audio". Add a way to translate the old property names to the new ones, similar to the input command legacy bridge. Update input.conf. Use the new property names, and don't use legacy commands.
Diffstat (limited to 'input')
-rw-r--r--input/input.c77
1 files changed, 38 insertions, 39 deletions
diff --git a/input/input.c b/input/input.c
index 97d6a6b25a..7d751ea1bf 100644
--- a/input/input.c
+++ b/input/input.c
@@ -161,46 +161,45 @@ static const mp_cmd_t mp_cmds[] = {
struct legacy_cmd {
const char *old, *new;
};
-#define LEGACY_STEP(old) {old, "switch " old}
static const struct legacy_cmd legacy_cmds[] = {
- LEGACY_STEP("loop"),
- {"seek_chapter", "switch chapter"},
- {"switch_angle", "switch angle"},
- LEGACY_STEP("pause"),
- LEGACY_STEP("volume"),
- LEGACY_STEP("mute"),
- LEGACY_STEP("audio_delay"),
- LEGACY_STEP("switch_audio"),
- LEGACY_STEP("balance"),
- {"vo_fullscreen", "no-osd switch fullscreen"},
- LEGACY_STEP("panscan"),
- {"vo_ontop", "switch ontop"},
- {"vo_rootwin", "switch rootwin"},
- {"vo_border", "switch border"},
- {"frame_drop", "switch framedropping"},
- LEGACY_STEP("gamma"),
- LEGACY_STEP("brightness"),
- LEGACY_STEP("contrast"),
- LEGACY_STEP("saturation"),
- LEGACY_STEP("hue"),
- {"switch_vsync", "switch vsync"},
- {"sub_select", "switch sub"},
- LEGACY_STEP("sub_pos"),
- LEGACY_STEP("sub_delay"),
- LEGACY_STEP("sub_visibility"),
- {"forced_subs_only", "switch sub_forced_only"},
- LEGACY_STEP("sub_scale"),
- LEGACY_STEP("ass_use_margins"),
- {"tv_set_brightness", "tv_brightness"},
- {"tv_set_hue", "tv_hue"},
- {"tv_set_saturation", "tv_saturation"},
- {"tv_set_contrast", "tv_contrast"},
- {"step_property_osd", "switch"},
- {"step_property", "no-osd switch"},
- {"set_property", "no-osd set"},
- {"set_property_osd", "set"},
- {"pt_step 1", "playlist_next"},
- {"pt_step -1", "playlist_prev"},
+ {"loop", "switch loop"},
+ {"seek_chapter", "switch chapter"},
+ {"switch_angle", "switch angle"},
+ {"pause", "switch pause"},
+ {"volume", "switch volume"},
+ {"mute", "switch mute"},
+ {"audio_delay", "switch audio-delay"},
+ {"switch_audio", "switch audio"},
+ {"balance", "switch balance"},
+ {"vo_fullscreen", "no-osd switch fullscreen"},
+ {"panscan", "switch panscan"},
+ {"vo_ontop", "switch ontop"},
+ {"vo_rootwin", "switch rootwin"},
+ {"vo_border", "switch border"},
+ {"frame_drop", "switch framedropping"},
+ {"gamma", "switch gamma"},
+ {"brightness", "switch brightness"},
+ {"contrast", "switch contrast"},
+ {"saturation", "switch saturation"},
+ {"hue", "switch hue"},
+ {"switch_vsync", "switch vsync"},
+ {"sub_select", "switch sub"},
+ {"sub_pos", "switch sub-pos"},
+ {"sub_delay", "switch sub-delay"},
+ {"sub_visibility", "switch sub-visibility"},
+ {"forced_subs_only", "switch sub-forced-only"},
+ {"sub_scale", "switch sub-scale"},
+ {"ass_use_margins", "switch ass-use-margins"},
+ {"tv_set_brightness", "switch tv-brightness"},
+ {"tv_set_hue", "switch tv-hue"},
+ {"tv_set_saturation", "switch tv-saturation"},
+ {"tv_set_contrast", "switch tv-contrast"},
+ {"step_property_osd", "switch"},
+ {"step_property", "no-osd switch"},
+ {"set_property", "no-osd set"},
+ {"set_property_osd", "set"},
+ {"pt_step 1", "playlist_next"},
+ {"pt_step -1", "playlist_prev"},
{0}
};