| 162 | } |
| 163 | |
| 164 | void ControllerMappingDialog::startButtonMapping(const QString &logicalButton) { |
| 165 | if (!controller) return; |
| 166 | |
| 167 | // Disable all mapping buttons during mapping |
| 168 | for (auto button : mappingButtons) { |
| 169 | button->setEnabled(false); |
| 170 | } |
| 171 | |
| 172 | // Update the current button being mapped |
| 173 | currentMappingButton = logicalButton; |
| 174 | mappingButtons[logicalButton]->setText(tr("Press button...")); |
| 175 | |
| 176 | // Start button detection mode |
| 177 | controller->startButtonDetection(); |
| 178 | |
| 179 | // Start timeout timer |
| 180 | mappingTimeoutTimer->start(); |
| 181 | |
| 182 | // Show status message |
| 183 | QApplication::setOverrideCursor(Qt::WaitCursor); |
| 184 | } |
| 185 | |
| 186 | void ControllerMappingDialog::onRawButtonPressed(int sdlButton, const QString &buttonName) { |
| 187 | if (currentMappingButton.isEmpty()) return; |
nothing calls this directly
no test coverage detected