mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-12-23 11:31:49 +01:00
Reset active state in config menu when active selection is aborted (by pressing B or home)
This commit is contained in:
parent
3cf0f5d9fd
commit
99987df459
@ -5,7 +5,8 @@ ConfigDisplayItem::ConfigDisplayItem(GeneralConfigInformation &info,
|
||||
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config,
|
||||
const bool isActive) : mConfig(std::move(config)),
|
||||
mInfo(std::move(info)),
|
||||
mIsActivePlugin(isActive) {
|
||||
mIsActivePlugin(isActive),
|
||||
mInitialIsActivePlugin(isActive) {
|
||||
assert(mConfig);
|
||||
}
|
||||
|
||||
@ -23,4 +24,8 @@ bool ConfigDisplayItem::isActivePlugin() const {
|
||||
|
||||
void ConfigDisplayItem::toggleIsActivePlugin() {
|
||||
mIsActivePlugin = !mIsActivePlugin;
|
||||
}
|
||||
|
||||
void ConfigDisplayItem::resetIsActivePlugin() {
|
||||
mIsActivePlugin = mInitialIsActivePlugin;
|
||||
}
|
@ -24,8 +24,11 @@ public:
|
||||
|
||||
void toggleIsActivePlugin();
|
||||
|
||||
void resetIsActivePlugin();
|
||||
|
||||
private:
|
||||
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> mConfig;
|
||||
GeneralConfigInformation mInfo;
|
||||
bool mIsActivePlugin;
|
||||
bool mInitialIsActivePlugin;
|
||||
};
|
@ -120,6 +120,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