mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-05 12:35:06 +01:00
ConfigMenu: Fix calling onCloseCallback for item which are not in a category
This commit is contained in:
parent
823c94ca9c
commit
3a91c90e76
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -39,4 +39,5 @@ private:
|
||||
int32_t mRenderOffset = 0;
|
||||
int32_t mCurrentOpen = -1;
|
||||
void CallOnCloseCallback(const GeneralConfigInformation &info, const std::vector<std::unique_ptr<WUPSConfigAPIBackend::WUPSConfigCategory>> &categories);
|
||||
void CallOnCloseCallback(const GeneralConfigInformation &info, const WUPSConfigAPIBackend::WUPSConfig &config);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user