diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-03 00:31:41 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-03 00:31:41 +0000 |
commit | 4cd35a04b907fcf450f3571b0f3288df848c4b07 (patch) | |
tree | f47dab2f2f578efae47bde754f9462e433b151ba /linux | |
parent | 8e97bbd1dd30c66b3b12c42c56c773ee70b798b6 (diff) | |
download | mpv-4cd35a04b907fcf450f3571b0f3288df848c4b07.tar.bz2 mpv-4cd35a04b907fcf450f3571b0f3288df848c4b07.tar.xz |
FreeBSD support by Vladimir Kushnir vkushnir@Alfacom.net
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@959 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'linux')
-rw-r--r-- | linux/getch2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/getch2.c b/linux/getch2.c index 628d225170..871eef1704 100644 --- a/linux/getch2.c +++ b/linux/getch2.c @@ -201,15 +201,27 @@ found: void getch2_enable(){ struct termios tio_new; +#ifdef __FreeBSD__ + ioctl(0,TIOCGETA,&tio_orig); /* tcgetattr(0,&tio_orig); */ +#else ioctl(0,TCGETS,&tio_orig); /* tcgetattr(0,&tio_orig); */ +#endif tio_new=tio_orig; tio_new.c_lflag &= ~(ICANON|ECHO); /* Clear ICANON and ECHO. */ tio_new.c_cc[VMIN] = 1; tio_new.c_cc[VTIME] = 0; +#ifdef __FreeBSD__ + ioctl(0,TIOCSETA,&tio_new); /* tcsetattr(0,TCSANOW,&tio_new); */ +#else ioctl(0,TCSETS,&tio_new); /* tcsetattr(0,TCSANOW,&tio_new); */ +#endif } void getch2_disable(){ +#ifdef __FreeBSD__ + ioctl(0,TIOCSETA,&tio_orig); /* tcsetattr(0,TCSANOW,&tio_orig); */ +#else ioctl(0,TCSETS,&tio_orig); /* tcsetattr(0,TCSANOW,&tio_orig); */ +#endif } |