From ecfb0c7136f79c620c32b37de07a1f771cd440fb Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 24 Jun 2023 18:06:55 -0500 Subject: [PATCH] GUI: sample editor warnings, part 2 --- src/gui/sampleEdit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index 0ce5b9182..f68fd7a88 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -249,6 +249,15 @@ void FurnaceGUI::drawSampleEdit() { default: 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 DivDispatch* dispatch=e->getDispatch(i); @@ -514,6 +523,9 @@ void FurnaceGUI::drawSampleEdit() { } ImGui::EndCombo(); } + if (ImGui::IsItemHovered() && !warnLoopMode.empty()) { + ImGui::SetTooltip("%s",warnLoopMode.c_str()); + } popWarningColor(); pushWarningColor(!warnLoopPos.empty());