From ccee7e4dc6c0b0cdc59eadf84c4cd1046eda4e07 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Fri, 15 Feb 2019 19:41:55 +0100 Subject: [PATCH] enable "Swap Paddles" when paddles are auto detected --- src/gui/GameInfoDialog.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/GameInfoDialog.cxx b/src/gui/GameInfoDialog.cxx index 5231b673a..c386c9a71 100644 --- a/src/gui/GameInfoDialog.cxx +++ b/src/gui/GameInfoDialog.cxx @@ -495,7 +495,7 @@ void GameInfoDialog::saveConfig() myGameProperties.set(Controller_Left, myLeftPort->getSelectedTag().toString()); myGameProperties.set(Controller_Right, myRightPort->getSelectedTag().toString()); myGameProperties.set(Console_SwapPorts, (mySwapPorts->isEnabled() && mySwapPorts->getState()) ? "YES" : "NO"); - myGameProperties.set(Controller_SwapPaddles, (mySwapPaddles->isEnabled() && mySwapPaddles->getState()) ? "YES" : "NO"); + myGameProperties.set(Controller_SwapPaddles, (/*mySwapPaddles->isEnabled() &&*/ mySwapPaddles->getState()) ? "YES" : "NO"); // MouseAxis property (potentially contains 'range' information) string mcontrol = "AUTO"; @@ -579,6 +579,11 @@ void GameInfoDialog::updateControllerStates() bool enableSwapPaddles = BSPF::startsWithIgnoreCase(contrLeft, "PADDLES") || BSPF::startsWithIgnoreCase(contrRight, "PADDLES"); + if(instance().hasConsole()) + { + enableSwapPaddles |= BSPF::equalsIgnoreCase(instance().console().leftController().name(), "Paddles"); + enableSwapPaddles |= BSPF::equalsIgnoreCase(instance().console().rightController().name(), "Paddles"); + } if(instance().hasConsole()) {