| 304 | ////////////////////////////////////////////////////////////////////////// |
| 305 | |
| 306 | ControllerMacroWidget::ControllerMacroWidget(ControllerBindingWidget* parent) |
| 307 | : QWidget(parent) |
| 308 | { |
| 309 | m_ui.setupUi(this); |
| 310 | |
| 311 | const u32 port = parent->getPortNumber(); |
| 312 | const auto [pad_port, pad_slot] = sioConvertPadToPortAndSlot(port); |
| 313 | const bool mtap_enabled = parent->getDialog()->getBoolValue("Pad", (pad_port == 0) ? "MultitapPort1" : "MultitapPort2", false); |
| 314 | if (mtap_enabled) |
| 315 | { |
| 316 | static constexpr const std::array<char, 4> s_mtap_slot_names = {{'A', 'B', 'C', 'D'}}; |
| 317 | setWindowTitle(tr("Controller Port %1%2 Macros").arg(pad_port + 1).arg(s_mtap_slot_names[pad_slot])); |
| 318 | } |
| 319 | else |
| 320 | { |
| 321 | setWindowTitle(tr("Controller Port %1 Macros").arg(pad_port + 1)); |
| 322 | } |
| 323 | |
| 324 | createWidgets(parent); |
| 325 | } |
| 326 | |
| 327 | ControllerMacroWidget::~ControllerMacroWidget() = default; |
| 328 |
nothing calls this directly
no test coverage detected