From 4c4e8c03bd3ef210cb1b0be02ab181b8a49a2236 Mon Sep 17 00:00:00 2001 From: Gergo Koteles Date: Tue, 8 Jul 2025 00:02:54 +0200 Subject: [PATCH] mididevice: call HandleSystemExclusive only in one place --- src/mididevice.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mididevice.cpp b/src/mididevice.cpp index 413dd13..f1036c9 100644 --- a/src/mididevice.cpp +++ b/src/mididevice.cpp @@ -337,11 +337,6 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign if (m_ChannelMap[nTG] == ucSysExChannel || m_ChannelMap[nTG] == OmniMode) { LOGNOTE("MIDI-SYSEX: channel: %u, len: %u, TG: %u",m_ChannelMap[nTG],nLength,nTG); - HandleSystemExclusive(pMessage, nLength, nCable, nTG); - if (nLength == 5) { - break; // Send dump request only to the first TG that matches the MIDI channel requested via the SysEx message device ID - } - // Check for TX216/TX816 style performance sysex messages if (pMessage[3] == 0x04) @@ -452,6 +447,9 @@ void CMIDIDevice::MIDIMessageHandler (const u8 *pMessage, size_t nLength, unsign else { HandleSystemExclusive(pMessage, nLength, nCable, nTG); + if (nLength == 5) { + break; // Send dump request only to the first TG that matches the MIDI channel requested via the SysEx message device ID + } } } }