summaryrefslogtreecommitdiffstats
path: root/core/cfg-mplayer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-02-16 23:24:10 +0100
committerwm4 <wm4@nowhere>2013-02-20 23:45:56 +0100
commit0bad744d68a0ac066c5e648c8fd1673d1459478f (patch)
tree2470d210837710b7a77efe766f2bc13ded62d0c1 /core/cfg-mplayer.h
parent68daee220c305220bfeb8f4f473b981b2d34af70 (diff)
downloadmpv-0bad744d68a0ac066c5e648c8fd1673d1459478f.tar.bz2
mpv-0bad744d68a0ac066c5e648c8fd1673d1459478f.tar.xz
options: parse C-style escapes for some options
Being able to insert newline characters ("\n") is useful for --osd-status-msg, and possibly also for anything that prints to the terminal. Espcially --term-osd-esc looks relatively useless without being able to specify escapes. Maybe parsing escapes should happen during command line / config parsing instead (for all options).
Diffstat (limited to 'core/cfg-mplayer.h')
-rw-r--r--core/cfg-mplayer.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/cfg-mplayer.h b/core/cfg-mplayer.h
index a0b3f95f42..621d026d0d 100644
--- a/core/cfg-mplayer.h
+++ b/core/cfg-mplayer.h
@@ -675,10 +675,11 @@ const m_option_t mplayer_opts[]={
{"auto", 2},
{"no", 0})),
- OPT_STRING("term-osd-esc", term_osd_esc, 0, OPTDEF_STR("\x1b[A\r\x1b[K")),
- OPT_STRING("playing-msg", playing_msg, 0),
- OPT_STRING("status-msg", status_msg, 0),
- OPT_STRING("osd-status-msg", osd_status_msg, 0),
+ OPT_STRING("term-osd-esc", term_osd_esc, M_OPT_PARSE_ESCAPES,
+ OPTDEF_STR("\x1b[A\r\x1b[K")),
+ OPT_STRING("playing-msg", playing_msg, M_OPT_PARSE_ESCAPES),
+ OPT_STRING("status-msg", status_msg, M_OPT_PARSE_ESCAPES),
+ OPT_STRING("osd-status-msg", osd_status_msg, M_OPT_PARSE_ESCAPES),
{"slave-broken", &slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, NULL},
OPT_FLAG("idle", player_idle_mode, CONF_GLOBAL),