summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/changes.rst2
-rw-r--r--options/options.c2
-rw-r--r--options/options.h2
-rw-r--r--player/main.c6
4 files changed, 12 insertions, 0 deletions
diff --git a/DOCS/man/changes.rst b/DOCS/man/changes.rst
index 092256a0ac..841a4ce328 100644
--- a/DOCS/man/changes.rst
+++ b/DOCS/man/changes.rst
@@ -332,6 +332,8 @@ Slave mode
Assuming the system supports ``/dev/stdin``.
+ (The option was readded in 0.5.1 and sets exactly these options.)
+
* A JSON RPC protocol giving access to the client API is planned, but nothing
has emerged yet.
diff --git a/options/options.c b/options/options.c
index 090903bda6..2ff524f522 100644
--- a/options/options.c
+++ b/options/options.c
@@ -533,6 +533,8 @@ const m_option_t mp_opts[] = {
OPT_SUBSTRUCT("", encode_opts, encode_config, 0),
#endif
+ OPT_FLAG("slave-broken", slave_mode, CONF_GLOBAL),
+
{0}
};
diff --git a/options/options.h b/options/options.h
index 7b3bf4b69d..e5436383ad 100644
--- a/options/options.h
+++ b/options/options.h
@@ -240,6 +240,8 @@ typedef struct MPOpts {
int w32_priority;
+ int slave_mode;
+
int network_cookies_enabled;
char *network_cookies_file;
char *network_useragent;
diff --git a/player/main.c b/player/main.c
index 097d180dc1..97ccb0e639 100644
--- a/player/main.c
+++ b/player/main.c
@@ -376,6 +376,12 @@ int mp_initialize(struct MPContext *mpctx)
mp_msg_update_msglevels(mpctx->global);
}
+ if (opts->slave_mode) {
+ MP_WARN(mpctx, "--slave-broken is deprecated (see manpage).\n");
+ opts->consolecontrols = 0;
+ m_config_set_option0(mpctx->mconfig, "input-file", "/dev/stdin");
+ }
+
mpctx->input = mp_input_init(mpctx->global);
mpctx->global->stream_interrupt_cb = check_stream_interrupt;
mpctx->global->stream_interrupt_cb_ctx = mpctx;