enable "Swap Paddles" when paddles are auto detected

This commit is contained in:
thrust26 2019-02-15 19:41:55 +01:00
parent e3d40f9285
commit ccee7e4dc6
1 changed files with 6 additions and 1 deletions

View File

@ -495,7 +495,7 @@ void GameInfoDialog::saveConfig()
myGameProperties.set(Controller_Left, myLeftPort->getSelectedTag().toString()); myGameProperties.set(Controller_Left, myLeftPort->getSelectedTag().toString());
myGameProperties.set(Controller_Right, myRightPort->getSelectedTag().toString()); myGameProperties.set(Controller_Right, myRightPort->getSelectedTag().toString());
myGameProperties.set(Console_SwapPorts, (mySwapPorts->isEnabled() && mySwapPorts->getState()) ? "YES" : "NO"); 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) // MouseAxis property (potentially contains 'range' information)
string mcontrol = "AUTO"; string mcontrol = "AUTO";
@ -579,6 +579,11 @@ void GameInfoDialog::updateControllerStates()
bool enableSwapPaddles = BSPF::startsWithIgnoreCase(contrLeft, "PADDLES") || bool enableSwapPaddles = BSPF::startsWithIgnoreCase(contrLeft, "PADDLES") ||
BSPF::startsWithIgnoreCase(contrRight, "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()) if(instance().hasConsole())
{ {