aboutsummaryrefslogtreecommitdiff
path: root/utils/adlmidi-2/input.cc
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2021-01-07 13:50:36 +0300
committerWohlstand <admin@wohlnet.ru>2021-01-07 13:50:36 +0300
commite9e0f4f45e8add289d7dbcca2d5602c48a4c6a22 (patch)
tree68a6b6bbd61ce60e5c8a2991dfbe69f9e9561bdf /utils/adlmidi-2/input.cc
parent81d2fe6d0dcc8051b12efeef5522e54484639712 (diff)
downloadlibADLMIDI-e9e0f4f45e8add289d7dbcca2d5602c48a4c6a22.tar.gz
libADLMIDI-e9e0f4f45e8add289d7dbcca2d5602c48a4c6a22.tar.bz2
libADLMIDI-e9e0f4f45e8add289d7dbcca2d5602c48a4c6a22.zip
adlmidi2: Tune the build
Diffstat (limited to 'utils/adlmidi-2/input.cc')
-rw-r--r--utils/adlmidi-2/input.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/adlmidi-2/input.cc b/utils/adlmidi-2/input.cc
index 80aba57..c94fc47 100644
--- a/utils/adlmidi-2/input.cc
+++ b/utils/adlmidi-2/input.cc
@@ -5,7 +5,8 @@ xInput::xInput()
#ifdef _WIN32
inhandle = GetStdHandle(STD_INPUT_HANDLE);
#endif
-#if (!defined(_WIN32) || defined(__CYGWIN__)) && !defined(__DJGPP__) && !defined(__APPLE__)
+
+#ifdef USE_TERMIO
ioctl(0, TCGETA, &back);
InputTermio_t term = back;
term.c_lflag &= ~(ICANON | ECHO);
@@ -17,7 +18,7 @@ xInput::xInput()
xInput::~xInput()
{
-#if (!defined(_WIN32) || defined(__CYGWIN__)) && !defined(__DJGPP__) && !defined(__APPLE__)
+#ifdef USE_TERMIO
if(ioctl(0, TCSETA, &back) < 0)
fcntl(0, F_SETFL, fcntl(0, F_GETFL) & ~ O_NONBLOCK);
#endif