From cc0f3b0c95731d250abce96c98879932f24a8e8d Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Sat, 11 Dec 2010 09:24:45 +0000 Subject: Fix bitmap2String(). Default channel 16 wasn't working. --- muse2/muse/confmport.cpp | 4 ++-- muse2/muse/widgets/utils.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'muse2') diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp index 30318f03..b95db28d 100644 --- a/muse2/muse/confmport.cpp +++ b/muse2/muse/confmport.cpp @@ -65,7 +65,7 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) int no = atoi(id.toLatin1().constData()) - 1; if(no < 0 || no >= MIDI_PORTS) return; - midiPorts[no].setDefaultInChannels(string2bitmap(s)); + midiPorts[no].setDefaultInChannels(((1 << MIDI_CHANNELS) - 1) & string2bitmap(s)); song->update(); } break; @@ -75,7 +75,7 @@ void MPConfig::mdevViewItemRenamed(QTableWidgetItem* item) int no = atoi(id.toLatin1().constData()) - 1; if(no < 0 || no >= MIDI_PORTS) return; - midiPorts[no].setDefaultOutChannels(string2bitmap(s)); + midiPorts[no].setDefaultOutChannels(((1 << MIDI_CHANNELS) - 1) & string2bitmap(s)); song->update(); } break; diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp index 083ae3d3..ddcc63c5 100644 --- a/muse2/muse/widgets/utils.cpp +++ b/muse2/muse/widgets/utils.cpp @@ -94,8 +94,8 @@ QString bitmap2String(int bm) int first = 0; bool needSpace = false; bm &= 0xffff; - //for (int i = 0; i < 17; ++i) { - for (int i = 0; i < 16; ++i) { + for (int i = 0; i < 17; ++i) { + //for (int i = 0; i < 16; ++i) { if ((1 << i) & bm) { if (!range) { range = true; -- cgit v1.2.3