From 969a5d203bfae4719b0a00fd2d85326b16fcb1bb Mon Sep 17 00:00:00 2001 From: tildearrow Date: Fri, 21 Jan 2022 23:30:05 -0500 Subject: [PATCH] GUI: fix detune values fixes #51 --- src/gui/gui.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 925cba250..3e94381d1 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -683,10 +683,6 @@ void FurnaceGUI::drawInsList() { ImGui::End(); } -int detuneTable[8]={ - 0, 1, 2, 3, 0, -3, -2, -1 -}; - const char* fourOpAlgs[8]={ "1 > 2 > 3 > 4", "(1+2) > 3 > 4", "1+(2>3) > 4", "(1>2)+3 > 4", "(1>2) + (3>4)", "1 > (2+3+4)", "(1>2) + 3 + 4", "1 + 2 + 3 + 4" }; @@ -815,9 +811,9 @@ void FurnaceGUI::drawInsEdit() { P(ImGui::SliderScalar("EnvScale",ImGuiDataType_U8,&op.rs,&_ZERO,&_THREE)); P(ImGui::SliderScalar("Multiplier",ImGuiDataType_U8,&op.mult,&_ZERO,&_FIFTEEN)); - int detune=detuneTable[op.dt&7]; + int detune=(op.dt&7)-3; if (ImGui::SliderInt("Detune",&detune,-3,3)) { PARAMETER - op.dt=detune&7; + op.dt=detune+3; } P(ImGui::SliderScalar("Detune 2",ImGuiDataType_U8,&op.dt2,&_ZERO,&_THREE)); if (ImGui::IsItemHovered()) {