Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
external
ffmpeg
Commits
4b54c6d0
Commit
4b54c6d0
authored
Jul 11, 2007
by
Ramiro Polla
Browse files
Check for termios before conio
Originally committed as revision 9598 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e16e49ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ffmpeg.c
ffmpeg.c
+7
-7
No files found.
ffmpeg.c
View file @
4b54c6d0
...
...
@@ -34,15 +34,15 @@
#include "fifo.h"
#include "avstring.h"
#if defined(HAVE_CONIO_H)
#include <conio.h>
#elif defined(HAVE_TERMIOS_H)
#if defined(HAVE_TERMIOS_H)
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <termios.h>
#include <sys/resource.h>
#elif defined(HAVE_CONIO_H)
#include <conio.h>
#endif
#undef time //needed because HAVE_AV_CONFIG_H is defined on top
#include <time.h>
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment