Add call to set Serial options to prevent CR to CRLF conversion (#311)

Co-authored-by: probonopd <probonopd@users.noreply.github.com>
pull/366/head 2022-08-25
Kevin 2 years ago committed by GitHub
parent aa5a7c7450
commit dcbd04c831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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