summaryrefslogtreecommitdiffstats
path: root/player/loadfile.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-06 16:49:50 +0100
committerwm4 <wm4@nowhere>2014-02-10 00:14:52 +0100
commit8437356b6c615ac93f49fe122a591a229722dbe8 (patch)
treeed36dbe45b84eccbf2eac3d26431dca462e00709 /player/loadfile.c
parent20fbe2fb8c1b3b4f5b08dd529ac1897f24c88a95 (diff)
downloadmpv-8437356b6c615ac93f49fe122a591a229722dbe8.tar.bz2
mpv-8437356b6c615ac93f49fe122a591a229722dbe8.tar.xz
options: add --no-terminal switch
Mostly useful for internal reasons. This code will be enabled by default if mpv is started via the client API.
Diffstat (limited to 'player/loadfile.c')
-rw-r--r--player/loadfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/loadfile.c b/player/loadfile.c
index 9ba5a00758..662a714ec0 100644
--- a/player/loadfile.c
+++ b/player/loadfile.c
@@ -1097,7 +1097,7 @@ static void play_current_file(struct MPContext *mpctx)
load_per_file_options(mpctx->mconfig, mpctx->playlist->current->params,
mpctx->playlist->current->num_params);
- if (!opts->consolecontrols)
+ if (opts->use_terminal && !opts->consolecontrols)
getch2_disable();
#if HAVE_LIBASS
@@ -1393,7 +1393,7 @@ terminate_playback: // don't jump here after ao/vo/getch initialization!
if (mpctx->stop_play != PT_RESTART)
m_config_restore_backups(mpctx->mconfig);
- if (opts->consolecontrols)
+ if (opts->use_terminal && opts->consolecontrols)
getch2_enable();
mpctx->filename = NULL;