diff options
author | wm4 <wm4@nowhere> | 2013-12-15 18:04:13 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-15 18:06:21 +0100 |
commit | ff85afa537f48b20751c92a6453a579e2ff8a757 (patch) | |
tree | c96debc3e37efc7eb4be3937662d81d910df03d2 /mpvcore/player/main.c | |
parent | 6dcebd91301179f4e59ce6cdfa5ba720043e99bc (diff) | |
download | mpv-ff85afa537f48b20751c92a6453a579e2ff8a757.tar.bz2 mpv-ff85afa537f48b20751c92a6453a579e2ff8a757.tar.xz |
player: don't temporarily disable terminal handling when reloading files
There's no reason why we should do this. For some reason, the existing
code reset terminal handling to default after unloading a file, just to
initialize it again when loading a new file.
Might be related to github issue #412, although I don't think it helps,
since the default SIGTERM handler _should_ kill the mpv process.
(It's still a nice simplification, though.)
Diffstat (limited to 'mpvcore/player/main.c')
-rw-r--r-- | mpvcore/player/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mpvcore/player/main.c b/mpvcore/player/main.c index d95546f923..1a3bd15fe1 100644 --- a/mpvcore/player/main.c +++ b/mpvcore/player/main.c @@ -140,6 +140,8 @@ static MP_NORETURN void exit_player(struct MPContext *mpctx, mpctx->ass_library = NULL; #endif + getch2_disable(); + if (how != EXIT_NONE) { const char *reason; switch (how) { @@ -390,6 +392,9 @@ static int mpv_main(int argc, char *argv[]) } #endif + if (opts->consolecontrols) + getch2_enable(); + #if HAVE_LIBASS mpctx->ass_library = mp_ass_init(opts); #else |