diff options
Diffstat (limited to 'osdep/terminal-unix.c')
-rw-r--r-- | osdep/terminal-unix.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index 9b22ac26c3..72d0d14899 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -465,10 +465,6 @@ void terminal_setup_getch(struct input_ctx *ictx) if (mp_make_wakeup_pipe(death_pipe) < 0) return; - if (mp_make_wakeup_pipe(stop_cont_pipe) < 0) { - close_sig_pipes(); - return; - } // Disable reading from the terminal even if stdout is not a tty, to make // mpv ... | less @@ -550,6 +546,11 @@ void terminal_init(void) assert(!getch2_enabled); getch2_enabled = 1; + if (mp_make_wakeup_pipe(stop_cont_pipe) < 0) { + getch2_enabled = 0; + return; + } + tty_in = tty_out = open("/dev/tty", O_RDWR | O_CLOEXEC); if (tty_in < 0) { tty_in = STDIN_FILENO; |