diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp index 058f47d27..842bdcd3a 100644 --- a/es-app/src/guis/GuiMenu.cpp +++ b/es-app/src/guis/GuiMenu.cpp @@ -1280,6 +1280,17 @@ void GuiMenu::openInputDeviceOptions() } }); + // Whether to swap the A/B and X/Y buttons. + auto inputSwapButtons = std::make_shared(); + 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(); 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(); - 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(); diff --git a/es-core/src/Settings.cpp b/es-core/src/Settings.cpp index a6722faae..3750839d5 100644 --- a/es-core/src/Settings.cpp +++ b/es-core/src/Settings.cpp @@ -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"] = {"", ""};