From 3e9e6de16d69b98e11c87b2db646e8fab1672ea6 Mon Sep 17 00:00:00 2001 From: Ryzerth Date: Fri, 12 Feb 2021 22:47:10 +0100 Subject: [PATCH] added lazy db thing 2 --- core/src/gui/main_window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/gui/main_window.cpp b/core/src/gui/main_window.cpp index 78034bdb..0ca91d77 100644 --- a/core/src/gui/main_window.cpp +++ b/core/src/gui/main_window.cpp @@ -605,7 +605,7 @@ void drawWindow() { ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.0) - (ImGui::CalcTextSize("Max").x / 2.0)); ImGui::Text("Max"); ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.0) - 10); - if (ImGui::VSliderFloat("##_8_", ImVec2(20.0, 150.0), &fftMax, 0.0, lazyDb ? -160.0f : 100.0f, "")) { + if (ImGui::VSliderFloat("##_8_", ImVec2(20.0, 150.0), &fftMax, 0.0, lazyDb ? -160.0f : -100.0f, "")) { fftMax = std::max(fftMax, fftMin + 10); core::configManager.aquire(); core::configManager.conf["max"] = fftMax; @@ -617,7 +617,7 @@ void drawWindow() { ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.0) - (ImGui::CalcTextSize("Min").x / 2.0)); ImGui::Text("Min"); ImGui::SetCursorPosX((ImGui::GetWindowSize().x / 2.0) - 10); - if (ImGui::VSliderFloat("##_9_", ImVec2(20.0, 150.0), &fftMin, 0.0, lazyDb ? -160.0f : 100.0f, "")) { + if (ImGui::VSliderFloat("##_9_", ImVec2(20.0, 150.0), &fftMin, 0.0, lazyDb ? -160.0f : -100.0f, "")) { fftMin = std::min(fftMax - 10, fftMin); core::configManager.aquire(); core::configManager.conf["min"] = fftMin;