From e90b05ae367f938b0298449fb8c6a532f3dd8a69 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 18 Jun 2025 03:37:36 -0500 Subject: [PATCH] GUI: clamp channel volume bar issue #2568 --- src/gui/pattern.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/pattern.cpp b/src/gui/pattern.cpp index f74f138a6..c0bd230d0 100644 --- a/src/gui/pattern.cpp +++ b/src/gui/pattern.cpp @@ -929,6 +929,11 @@ void FurnaceGUI::drawPattern() { break; } + if (xLeft<0.0f) xLeft=0.0f; + if (xLeft>1.0f) xLeft=1.0f; + if (xRight<0.0f) xRight=0.0f; + if (xRight>1.0f) xRight=1.0f; + dl->AddRectFilled( ImLerp(rectV.Min,rectV.Max,ImVec2(xLeft,0.0f)), ImLerp(rectV.Min,rectV.Max,ImVec2(xRight,1.0f)),