From 87ca550b61743671ad97babaab27a6d12a87f105 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 4 Aug 2024 17:56:10 +0200 Subject: [PATCH] Add support for B-button in active-mode-screen --- source/utils/config/ConfigRenderer.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/source/utils/config/ConfigRenderer.cpp b/source/utils/config/ConfigRenderer.cpp index ed5a9d4..71eb57b 100644 --- a/source/utils/config/ConfigRenderer.cpp +++ b/source/utils/config/ConfigRenderer.cpp @@ -128,12 +128,18 @@ ConfigSubState ConfigRenderer::UpdateStateMain(const Input &input) { return SUB_STATE_RUNNING; } } else if (input.data.buttons_d & (Input::eButtons::BUTTON_B | Input::eButtons::BUTTON_HOME)) { - mNeedRedraw = true; - mCategoryRenderer.reset(); - for (const auto &element : configs) { - CallOnCloseCallback(element.get().getConfigInformation(), element.get().getConfig()); + if (mSetActivePluginsMode) { + mNeedRedraw = true; + mSetActivePluginsMode = false; + return SUB_STATE_RUNNING; + } else { + mNeedRedraw = true; + mCategoryRenderer.reset(); + for (const auto &element : configs) { + CallOnCloseCallback(element.get().getConfigInformation(), element.get().getConfig()); + } + return SUB_STATE_RETURN; } - return SUB_STATE_RETURN; } if (mCursorPos < 0) {