GUI: sample editor warnings, part 2

This commit is contained in:
tildearrow 2023-06-24 18:06:55 -05:00
parent 598e8ddf03
commit ecfb0c7136

View file

@ -249,6 +249,15 @@ void FurnaceGUI::drawSampleEdit() {
default: default:
break; break;
} }
if (e->song.system[i]!=DIV_SYSTEM_PCM_DAC) {
if (e->song.system[i]==DIV_SYSTEM_ES5506) {
if (sample->loopMode==DIV_SAMPLE_LOOP_BACKWARD) {
SAMPLE_WARN(warnLoopMode,"ES5506: backward loop mode isn't supported");
}
} else if (sample->loopMode!=DIV_SAMPLE_LOOP_FORWARD) {
SAMPLE_WARN(warnLoopMode,"backward/ping-pong only supported in Generic PCM DAC\nping-pong also on ES5506");
}
}
// chips grid // chips grid
DivDispatch* dispatch=e->getDispatch(i); DivDispatch* dispatch=e->getDispatch(i);
@ -514,6 +523,9 @@ void FurnaceGUI::drawSampleEdit() {
} }
ImGui::EndCombo(); ImGui::EndCombo();
} }
if (ImGui::IsItemHovered() && !warnLoopMode.empty()) {
ImGui::SetTooltip("%s",warnLoopMode.c_str());
}
popWarningColor(); popWarningColor();
pushWarningColor(!warnLoopPos.empty()); pushWarningColor(!warnLoopPos.empty());