fixed QuadTari controller settings

This commit is contained in:
Thomas Jentzsch 2021-10-04 10:07:42 +02:00
parent 7c2721ef2e
commit 16b9ebe0f8
1 changed files with 7 additions and 3 deletions

View File

@ -1130,7 +1130,7 @@ void GameInfoDialog::updateControllerStates()
{ {
label = (!swapPorts ? instance().console().leftController().name() label = (!swapPorts ? instance().console().leftController().name()
: instance().console().rightController().name()) + " detected"; : instance().console().rightController().name()) + " detected";
if(BSPF::startsWithIgnoreCase(label, "QUADTARI")) if(BSPF::startsWithIgnoreCase(label, "QT"))
label = "QuadTari detected"; // remove plugged-in controller names label = "QuadTari detected"; // remove plugged-in controller names
} }
else if(autoDetect) else if(autoDetect)
@ -1149,7 +1149,7 @@ void GameInfoDialog::updateControllerStates()
{ {
label = (!swapPorts ? instance().console().rightController().name() label = (!swapPorts ? instance().console().rightController().name()
: instance().console().leftController().name()) + " detected"; : instance().console().leftController().name()) + " detected";
if(BSPF::startsWithIgnoreCase(label, "QUADTARI")) if(BSPF::startsWithIgnoreCase(label, "QT"))
label = "QuadTari detected"; // remove plugged-in controller names label = "QuadTari detected"; // remove plugged-in controller names
} }
else if(autoDetect) else if(autoDetect)
@ -1193,7 +1193,9 @@ void GameInfoDialog::updateControllerStates()
myQuadTariButton->setEnabled(BSPF::startsWithIgnoreCase(contrLeft, "QUADTARI") || myQuadTariButton->setEnabled(BSPF::startsWithIgnoreCase(contrLeft, "QUADTARI") ||
BSPF::startsWithIgnoreCase(contrRight, "QUADTARI") || BSPF::startsWithIgnoreCase(contrRight, "QUADTARI") ||
BSPF::startsWithIgnoreCase(myLeftPortDetected->getLabel(), "QUADTARI") || BSPF::startsWithIgnoreCase(myLeftPortDetected->getLabel(), "QUADTARI") ||
BSPF::startsWithIgnoreCase(myRightPortDetected->getLabel(), "QUADTARI")); BSPF::startsWithIgnoreCase(myLeftPortDetected->getLabel(), "QT") ||
BSPF::startsWithIgnoreCase(myRightPortDetected->getLabel(), "QUADTARI") ||
BSPF::startsWithIgnoreCase(myRightPortDetected->getLabel(), "QT"));
mySwapPorts->setEnabled(enableSelectControl); mySwapPorts->setEnabled(enableSelectControl);
mySwapPaddles->setEnabled(enablePaddles); mySwapPaddles->setEnabled(enablePaddles);
@ -1422,9 +1424,11 @@ void GameInfoDialog::handleCommand(CommandSender* sender, int cmd,
{ {
bool enableLeft = bool enableLeft =
BSPF::startsWithIgnoreCase(myLeftPort->getSelectedTag().toString(), "QUADTARI") || BSPF::startsWithIgnoreCase(myLeftPort->getSelectedTag().toString(), "QUADTARI") ||
BSPF::startsWithIgnoreCase(myLeftPortDetected->getLabel(), "QT") ||
BSPF::startsWithIgnoreCase(myLeftPortDetected->getLabel(), "QUADTARI"); BSPF::startsWithIgnoreCase(myLeftPortDetected->getLabel(), "QUADTARI");
bool enableRight = bool enableRight =
BSPF::startsWithIgnoreCase(myRightPort->getSelectedTag().toString(), "QUADTARI") || BSPF::startsWithIgnoreCase(myRightPort->getSelectedTag().toString(), "QUADTARI") ||
BSPF::startsWithIgnoreCase(myRightPortDetected->getLabel(), "QT") ||
BSPF::startsWithIgnoreCase(myRightPortDetected->getLabel(), "QUADTARI"); BSPF::startsWithIgnoreCase(myRightPortDetected->getLabel(), "QUADTARI");
if(!myQuadTariDialog) if(!myQuadTariDialog)