mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-22 20:59:16 +01:00
Reset active state in config menu when active selection is aborted (by pressing B or home)
This commit is contained in:
parent
01778ecb51
commit
ef1296c8dd
@ -12,7 +12,7 @@ struct GeneralConfigInformation {
|
||||
|
||||
class ConfigDisplayItem {
|
||||
public:
|
||||
ConfigDisplayItem(GeneralConfigInformation &info, std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config, bool isActive) : mConfig(std::move(config)), mInfo(std::move(info)), mIsActivePlugin(isActive) {
|
||||
ConfigDisplayItem(GeneralConfigInformation &info, std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config, bool isActive) : mConfig(std::move(config)), mInfo(std::move(info)), mIsActivePlugin(isActive), mInitialIsActivePlugin(isActive) {
|
||||
assert(mConfig);
|
||||
}
|
||||
[[nodiscard]] const GeneralConfigInformation &getConfigInformation() const {
|
||||
@ -30,8 +30,13 @@ public:
|
||||
mIsActivePlugin = !mIsActivePlugin;
|
||||
}
|
||||
|
||||
void resetIsActivePlugin() {
|
||||
mIsActivePlugin = mInitialIsActivePlugin;
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> mConfig;
|
||||
GeneralConfigInformation mInfo;
|
||||
bool mIsActivePlugin;
|
||||
bool mInitialIsActivePlugin;
|
||||
};
|
@ -131,6 +131,9 @@ ConfigSubState ConfigRenderer::UpdateStateMain(const Input &input) {
|
||||
}
|
||||
} else if (input.data.buttons_d & (Input::eButtons::BUTTON_B | Input::eButtons::BUTTON_HOME)) {
|
||||
if (mSetActivePluginsMode) {
|
||||
for (auto &cur : mConfigs) {
|
||||
cur.resetIsActivePlugin();
|
||||
}
|
||||
mNeedRedraw = true;
|
||||
mSetActivePluginsMode = false;
|
||||
return SUB_STATE_RUNNING;
|
||||
|
Loading…
Reference in New Issue
Block a user