From ce5f3fd94ef5cf726bd7bccf1f486082e353bbab Mon Sep 17 00:00:00 2001 From: cam900 Date: Wed, 20 Apr 2022 20:38:20 +0900 Subject: [PATCH] Further fix looped sample preview --- src/gui/sampleEdit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/sampleEdit.cpp b/src/gui/sampleEdit.cpp index 9919c069f..802e10bc5 100644 --- a/src/gui/sampleEdit.cpp +++ b/src/gui/sampleEdit.cpp @@ -1137,7 +1137,8 @@ void FurnaceGUI::drawSampleEdit() { ImU32 centerLineColor=ImAlphaBlendColors(bgColor,ImGui::GetColorU32(ImGuiCol_PlotLines,0.25)); for (int i=0; iloopStart>=0 && sample->loopStart<(int)sample->samples && ((j+samplePos)*sampleZoom)>sample->loopStart) { + int scaledPos=samplePos+(j*sampleZoom); + if (sample->loopStart>=0 && sample->loopStart<(int)sample->samples && scaledPos>=sample->loopStart) { data[i*availX+j]=bgColorLoop; } else { data[i*availX+j]=bgColor;