mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-26 06:34: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 {
|
class ConfigDisplayItem {
|
||||||
public:
|
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);
|
assert(mConfig);
|
||||||
}
|
}
|
||||||
[[nodiscard]] const GeneralConfigInformation &getConfigInformation() const {
|
[[nodiscard]] const GeneralConfigInformation &getConfigInformation() const {
|
||||||
@ -30,8 +30,13 @@ public:
|
|||||||
mIsActivePlugin = !mIsActivePlugin;
|
mIsActivePlugin = !mIsActivePlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void resetIsActivePlugin() {
|
||||||
|
mIsActivePlugin = mInitialIsActivePlugin;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> mConfig;
|
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> mConfig;
|
||||||
GeneralConfigInformation mInfo;
|
GeneralConfigInformation mInfo;
|
||||||
bool mIsActivePlugin;
|
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)) {
|
} else if (input.data.buttons_d & (Input::eButtons::BUTTON_B | Input::eButtons::BUTTON_HOME)) {
|
||||||
if (mSetActivePluginsMode) {
|
if (mSetActivePluginsMode) {
|
||||||
|
for (auto &cur : mConfigs) {
|
||||||
|
cur.resetIsActivePlugin();
|
||||||
|
}
|
||||||
mNeedRedraw = true;
|
mNeedRedraw = true;
|
||||||
mSetActivePluginsMode = false;
|
mSetActivePluginsMode = false;
|
||||||
return SUB_STATE_RUNNING;
|
return SUB_STATE_RUNNING;
|
||||||
|
Loading…
Reference in New Issue
Block a user