aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-12-05 00:56:34 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-12-05 00:56:34 +0300
commitd89084d6eaf3bb65c134201f61449656226cbf80 (patch)
treef389f889173d198e65d913d91b2b97a8e5f95d79
parented474f401d9bba59cd9befff26d9d688ed2a8e68 (diff)
downloadlibADLMIDI-d89084d6eaf3bb65c134201f61449656226cbf80.tar.gz
libADLMIDI-d89084d6eaf3bb65c134201f61449656226cbf80.tar.bz2
libADLMIDI-d89084d6eaf3bb65c134201f61449656226cbf80.zip
ADLMIDI2: Backport minor fix from official ADLMIDI
Change setbuffer to setvbuf, fixing PR2 / issue 2. https://github.com/bisqwit/adlmidi/commit/2f3a6263b79b832efac1feda07cee07820dfc309
-rw-r--r--utils/adlmidi-2/midiplay.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/adlmidi-2/midiplay.cc b/utils/adlmidi-2/midiplay.cc
index d74fec9..f511e0a 100644
--- a/utils/adlmidi-2/midiplay.cc
+++ b/utils/adlmidi-2/midiplay.cc
@@ -264,7 +264,7 @@ public:
std::memset(background, '.', sizeof(background));
std::memset(backgroundcolor, 1, sizeof(backgroundcolor));
#ifndef _WIN32
- setbuffer(stderr, stderr_buffer, sizeof(stderr_buffer));
+ std::setvbuf(stderr, stderr_buffer, _IOFBF, sizeof(stderr_buffer));
#endif
RawPrn("\r"); // Ensure cursor is at the x=0 we imagine it being
Print(0, 7, true, "Hit Ctrl-C to quit");