diff --git a/source/utils/config/ConfigRenderer.cpp b/source/utils/config/ConfigRenderer.cpp index 742c104..963abdb 100644 --- a/source/utils/config/ConfigRenderer.cpp +++ b/source/utils/config/ConfigRenderer.cpp @@ -84,7 +84,7 @@ ConfigSubState ConfigRenderer::UpdateStateMain(const Input &input) { } else if (input.data.buttons_d & (Input::eButtons::BUTTON_B | Input::eButtons::BUTTON_HOME)) { mCategoryRenderer.reset(); for (const auto &element : mConfigs) { - CallOnCloseCallback(element.getConfigInformation(), element.getConfig().getCategories()); + CallOnCloseCallback(element.getConfigInformation(), element.getConfig()); } return SUB_STATE_RETURN; } @@ -152,3 +152,10 @@ void ConfigRenderer::CallOnCloseCallback(const GeneralConfigInformation &info, c } } } + +void ConfigRenderer::CallOnCloseCallback(const GeneralConfigInformation &info, const WUPSConfigAPIBackend::WUPSConfig &config) { + CallOnCloseCallback(info, config.getCategories()); + for (const auto &item : config.getItems()) { + item->onCloseCallback(); + } +} diff --git a/source/utils/config/ConfigRenderer.h b/source/utils/config/ConfigRenderer.h index 5a0f27d..2cba9e9 100644 --- a/source/utils/config/ConfigRenderer.h +++ b/source/utils/config/ConfigRenderer.h @@ -39,4 +39,5 @@ private: int32_t mRenderOffset = 0; int32_t mCurrentOpen = -1; void CallOnCloseCallback(const GeneralConfigInformation &info, const std::vector> &categories); + void CallOnCloseCallback(const GeneralConfigInformation &info, const WUPSConfigAPIBackend::WUPSConfig &config); };