diff options
author | wm4 <wm4@nowhere> | 2014-08-20 21:19:20 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-20 21:19:20 +0200 |
commit | 09897bed7f6905427dd35196b3c17aa7d3d066ab (patch) | |
tree | bad0df9605b4164e90c2b4c314eccaafc32a4d2e /osdep/terminal-unix.c | |
parent | 614ff883bc8166a1c0e22c993c93895c204160ea (diff) | |
download | mpv-09897bed7f6905427dd35196b3c17aa7d3d066ab.tar.bz2 mpv-09897bed7f6905427dd35196b3c17aa7d3d066ab.tar.xz |
terminal-unix: eliminate unnecessary variable
Diffstat (limited to 'osdep/terminal-unix.c')
-rw-r--r-- | osdep/terminal-unix.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c index 21ed42cb68..499ad73394 100644 --- a/osdep/terminal-unix.c +++ b/osdep/terminal-unix.c @@ -47,8 +47,6 @@ #include "input/keycodes.h" #include "terminal.h" -static int use_terminal; - #if HAVE_TERMIOS static volatile struct termios tio_orig; static volatile int tio_orig_set; @@ -474,7 +472,7 @@ static volatile int getch2_enabled = 0; static void do_activate_getch2(void) { - if (getch2_active || !use_terminal) + if (getch2_active || !isatty(1)) return; #if HAVE_TERMINFO || HAVE_TERMCAP @@ -627,8 +625,7 @@ void terminal_set_foreground_color(FILE *stream, int c) int terminal_init(void) { - use_terminal = isatty(1); - if (use_terminal) + if (isatty(1)) load_termcap(NULL); return 0; } |