summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse2/muse/confmport.cpp4
-rw-r--r--muse2/muse/widgets/utils.cpp4
2 files changed, 4 insertions, 4 deletions
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;