Add call to set Serial options to prevent CR to CRLF conversion

pull/311/head
Kevin 3 years ago
parent 50e9b7b8e0
commit 4fed1bf087
  1. 7
      src/serialmididevice.cpp

@ -49,7 +49,12 @@ CSerialMIDIDevice::~CSerialMIDIDevice (void)
boolean CSerialMIDIDevice::Initialize (void)
{
assert (m_pConfig);
return m_Serial.Initialize (m_pConfig->GetMIDIBaudRate ());
boolean res = m_Serial.Initialize (m_pConfig->GetMIDIBaudRate ());
unsigned ser_options = m_Serial.GetOptions();
// Ensure CR->CRLF translation is disabled for MIDI links
ser_options &= ~(SERIAL_OPTION_ONLCR);
m_Serial.SetOptions(ser_options);
return res;
}
void CSerialMIDIDevice::Process (void)

Loading…
Cancel
Save