summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/terminal-unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index 478b613999..ca7b59a964 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -386,6 +386,7 @@ static void *terminal_thread(void *ptr)
mpthread_set_name("terminal");
bool stdin_ok = read_terminal; // if false, we still wait for SIGTERM
while (1) {
+ getch2_poll();
struct pollfd fds[2] = {
{.events = POLLIN, .fd = death_pipe[0]},
{.events = POLLIN, .fd = STDIN_FILENO},
@@ -396,7 +397,6 @@ static void *terminal_thread(void *ptr)
break;
if (fds[1].revents)
stdin_ok = getch2(input_ctx);
- getch2_poll();
}
// Important if we received SIGTERM, rather than regular quit.
struct mp_cmd *cmd = mp_input_parse_cmd(input_ctx, bstr0("quit"), "");