diff --git a/src/gui/sysConf.cpp b/src/gui/sysConf.cpp index b6ace47f5..527afa878 100644 --- a/src/gui/sysConf.cpp +++ b/src/gui/sysConf.cpp @@ -2812,7 +2812,12 @@ bool FurnaceGUI::drawSysConf(int chan, int sysPos, DivSystem type, DivConfig& fl ImGui::TextUnformatted(_("Channels")); ImGui::SameLine(); ImGui::SetNextItemWidth(120.0f*dpiScale); - ImGui::InputInt("##ChCount",&chCount,0,0); + if (ImGui::InputInt("##ChCount",&chCount,0,0)) { + if (sysDef!=NULL) { + if (chCountminChans) chCount=sysDef->minChans; + if (chCount>sysDef->maxChans) chCount=sysDef->maxChans; + } + } if (ImGui::IsItemDeactivatedAfterEdit() && chCount!=e->song.systemChans[chan]) { if (e->setSystemChans(chan,chCount,preserveChanPos)) { MARK_MODIFIED;