From e93962e9e51808d7618e5f2b2bad09714126a005 Mon Sep 17 00:00:00 2001 From: Suyash Date: Fri, 18 Sep 2026 02:44:35 +0000 Subject: [PATCH] fix(ui): manual EQ sliders cover the full -10..+10 range MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The custom-EQ sliders were limited to 0..10, so every band could only be boosted — cutting a band was impossible from the Windows/Linux UI, and a negative value read back from the headphones (`requestEqualizer()` decodes `byte - 10`) was clamped to 0 by the widget and pushed back on the next edit. Both ends of the protocol already use the signed range: `setEqualizerCustom()` clamps to [-10, 10] and sends `value + 10`. The macOS UI uses -10...10 too, so this also makes the two interfaces agree. Co-Authored-By: Claude Opus 5 --- Client/CrossPlatformGUI.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Client/CrossPlatformGUI.cpp b/Client/CrossPlatformGUI.cpp index 993d9a85..ba90fc0b 100644 --- a/Client/CrossPlatformGUI.cpp +++ b/Client/CrossPlatformGUI.cpp @@ -462,9 +462,11 @@ void CrossPlatformGUI::_drawEqualizer() for (int i = 0; i < 6; ++i) { std::string id = "##eqband" + std::to_string(i); - std::string fmt = std::string(bandNames[i]) + " %d"; + std::string fmt = std::string(bandNames[i]) + " %+d"; ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); - if (ImGui::SliderInt(id.c_str(), values[i], 0, 10, fmt.c_str())) + // Range is -10..+10 on the wire: Headphones::setEqualizerCustom() clamps to that and sends + // value+10, and requestEqualizer() decodes byte-10. A 0..10 slider could only ever boost. + if (ImGui::SliderInt(id.c_str(), values[i], -10, 10, fmt.c_str())) changed = true; } if (changed)