From 4b54c6d08437e5e3dd9359f29b247be58fef965f Mon Sep 17 00:00:00 2001 From: Ramiro Polla Date: Wed, 11 Jul 2007 14:07:55 +0000 Subject: Check for termios before conio Originally committed as revision 9598 to svn://svn.ffmpeg.org/ffmpeg/trunk --- ffmpeg.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ffmpeg.c') diff --git a/ffmpeg.c b/ffmpeg.c index 766c6068b0..d5cc28a25c 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -34,15 +34,15 @@ #include "fifo.h" #include "avstring.h" -#if defined(HAVE_CONIO_H) -#include -#elif defined(HAVE_TERMIOS_H) +#if defined(HAVE_TERMIOS_H) #include #include #include #include #include #include +#elif defined(HAVE_CONIO_H) +#include #endif #undef time //needed because HAVE_AV_CONFIG_H is defined on top #include @@ -334,10 +334,7 @@ static void term_init(void) /* read a key without blocking */ static int read_key(void) { -#if defined(HAVE_CONIO_H) - if(kbhit()) - return(getch()); -#elif defined(HAVE_TERMIOS_H) +#if defined(HAVE_TERMIOS_H) int n = 1; unsigned char ch; #ifndef CONFIG_BEOS_NETSERVER @@ -357,6 +354,9 @@ static int read_key(void) return n; } +#elif defined(HAVE_CONIO_H) + if(kbhit()) + return(getch()); #endif return -1; } -- cgit v1.2.3