mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Changed the menu position for the button swap setting
This commit is contained in:
parent
0e636f1bb3
commit
8244b4229b
|
@ -1280,6 +1280,17 @@ void GuiMenu::openInputDeviceOptions()
|
|||
}
|
||||
});
|
||||
|
||||
// Whether to swap the A/B and X/Y buttons.
|
||||
auto inputSwapButtons = std::make_shared<SwitchComponent>();
|
||||
inputSwapButtons->setState(Settings::getInstance()->getBool("InputSwapButtons"));
|
||||
s->addWithLabel("SWAP A/B AND X/Y BUTTONS", inputSwapButtons);
|
||||
s->addSaveFunc([inputSwapButtons, s] {
|
||||
if (Settings::getInstance()->getBool("InputSwapButtons") != inputSwapButtons->getState()) {
|
||||
Settings::getInstance()->setBool("InputSwapButtons", inputSwapButtons->getState());
|
||||
s->setNeedsSaving();
|
||||
}
|
||||
});
|
||||
|
||||
// Whether to ignore keyboard input (except the quit shortcut).
|
||||
auto inputIgnoreKeyboard = std::make_shared<SwitchComponent>();
|
||||
inputIgnoreKeyboard->setState(Settings::getInstance()->getBool("InputIgnoreKeyboard"));
|
||||
|
@ -1293,17 +1304,6 @@ void GuiMenu::openInputDeviceOptions()
|
|||
}
|
||||
});
|
||||
|
||||
// Whether to swap the A/B and X/Y buttons.
|
||||
auto inputSwapButtons = std::make_shared<SwitchComponent>();
|
||||
inputSwapButtons->setState(Settings::getInstance()->getBool("InputSwapButtons"));
|
||||
s->addWithLabel("SWAP A/B AND X/Y BUTTONS", inputSwapButtons);
|
||||
s->addSaveFunc([inputSwapButtons, s] {
|
||||
if (Settings::getInstance()->getBool("InputSwapButtons") != inputSwapButtons->getState()) {
|
||||
Settings::getInstance()->setBool("InputSwapButtons", inputSwapButtons->getState());
|
||||
s->setNeedsSaving();
|
||||
}
|
||||
});
|
||||
|
||||
// Configure keyboard and controllers.
|
||||
ComponentListRow configureInputRow;
|
||||
configureInputRow.elements.clear();
|
||||
|
|
|
@ -245,8 +245,8 @@ void Settings::setDefaults()
|
|||
mBoolMap["InputTouchOverlay"] = {true, true};
|
||||
#endif
|
||||
mBoolMap["InputOnlyFirstController"] = {false, false};
|
||||
mBoolMap["InputIgnoreKeyboard"] = {false, false};
|
||||
mBoolMap["InputSwapButtons"] = {false, false};
|
||||
mBoolMap["InputIgnoreKeyboard"] = {false, false};
|
||||
|
||||
// Game collection settings.
|
||||
mStringMap["CollectionSystemsAuto"] = {"", ""};
|
||||
|
|
Loading…
Reference in a new issue