From c13d2b567c28f2e837be2210c83a250c0de4778f Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Tue, 2 Oct 2018 12:07:02 -0500 Subject: [PATCH] mid2agb fix: compare whole note details before compression --- tools/mid2agb/midi.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/mid2agb/midi.cpp b/tools/mid2agb/midi.cpp index 93600d30e..fa7d9ce28 100644 --- a/tools/mid2agb/midi.cpp +++ b/tools/mid2agb/midi.cpp @@ -852,6 +852,12 @@ int CalculateCompressionScore(std::vector& events, int index) bool IsCompressionMatch(std::vector& events, int index1, int index2) { + if (events[index1].type != events[index2].type || + events[index1].note != events[index2].note || + events[index1].param1 != events[index2].param1 || + events[index1].time != events[index2].time) + return false; + index1++; index2++;