@@ -120,8 +120,7 @@ MainWindow::MainWindow(QMap<SDL_JoystickID, InputDevice *> *joysticks, CommandLi
120
120
#endif
121
121
122
122
signalDisconnect = false ;
123
- showTrayIcon = !cmdutility->isTrayHidden () && graphical && !cmdutility->shouldListControllers () &&
124
- !cmdutility->shouldMapController ();
123
+ showTrayIcon = !cmdutility->isTrayHidden () && graphical && !cmdutility->shouldListControllers ();
125
124
126
125
m_joysticks = joysticks;
127
126
@@ -174,7 +173,6 @@ MainWindow::MainWindow(QMap<SDL_JoystickID, InputDevice *> *joysticks, CommandLi
174
173
connect (ui->actionOptions , &QAction::triggered, this , &MainWindow::openMainSettingsDialog);
175
174
connect (ui->actionWiki , &QAction::triggered, this , &MainWindow::openWikiPage);
176
175
connect (ui->actionCalibration , &QAction::triggered, this , &MainWindow::openCalibration);
177
- connect (ui->actionGameController_Mapping , &QAction::triggered, this , &MainWindow::openGameControllerMappingWindow);
178
176
179
177
#if defined(WITH_X11)
180
178
if (QApplication::platformName () == QStringLiteral (" xcb" ))
@@ -299,44 +297,6 @@ void MainWindow::alterConfigFromSettings()
299
297
}
300
298
}
301
299
302
- void MainWindow::controllerMapOpening ()
303
- {
304
- if (m_cmdutility->shouldMapController ())
305
- {
306
- m_graphical = false ;
307
-
308
- const QList<ControllerOptionsInfo> tempList = m_cmdutility->getControllerOptionsList ();
309
- ControllerOptionsInfo temp = tempList.at (0 );
310
-
311
- if (temp.hasControllerNumber ())
312
- {
313
- int joypadIndex = m_cmdutility->getControllerNumber ();
314
-
315
- qDebug () << " It was antimicrox --map controllerNumber" ;
316
- qDebug () << " controllerNumber: " << joypadIndex;
317
-
318
- selectControllerJoyTab (joypadIndex);
319
- openGameControllerMappingWindow (true );
320
- } else if (temp.hasControllerID ())
321
- {
322
- QString joypadGUID = m_cmdutility->getControllerID ();
323
-
324
- qDebug () << " It was antimicrox --map controllerID" ;
325
- qDebug () << " controllerID: " << joypadGUID;
326
-
327
- selectControllerJoyTab (joypadGUID);
328
- openGameControllerMappingWindow (true );
329
- } else
330
- {
331
- qDebug () << " Could not find a proper controller identifier. Exiting" ;
332
-
333
- qInfo () << tr (" Could not find a proper controller identifier. "
334
- " Exiting." );
335
- qApp->quit ();
336
- }
337
- }
338
- }
339
-
340
300
void MainWindow::fillButtons () { fillButtonsMap (m_joysticks); }
341
301
342
302
void MainWindow::makeJoystickTabs ()
@@ -1468,36 +1428,6 @@ void MainWindow::restartAsElevated()
1468
1428
}
1469
1429
#endif
1470
1430
1471
- void MainWindow::openGameControllerMappingWindow (bool openAsMain)
1472
- {
1473
- int index = ui->tabWidget ->currentIndex ();
1474
- if (index >= 0 )
1475
- {
1476
- JoyTabWidget *joyTab = qobject_cast<JoyTabWidget *>(ui->tabWidget ->widget (index)); // static_cast
1477
- InputDevice *joystick = joyTab->getJoystick ();
1478
- if (joystick != nullptr )
1479
- {
1480
- GameControllerMappingDialog *dialog = new GameControllerMappingDialog (joystick, m_settings, this );
1481
-
1482
- if (openAsMain)
1483
- {
1484
- dialog->setParent (nullptr );
1485
- dialog->setWindowFlags (Qt::Window);
1486
- connect (dialog, &GameControllerMappingDialog::finished, qApp, &QApplication::quit);
1487
- } else
1488
- {
1489
- connect (dialog, &GameControllerMappingDialog::mappingUpdate, this , &MainWindow::propogateMappingUpdate);
1490
- }
1491
-
1492
- dialog->show ();
1493
- }
1494
- } else if (openAsMain)
1495
- {
1496
- qInfo () << tr (" Could not find controller. Exiting." );
1497
- qApp->quit ();
1498
- }
1499
- }
1500
-
1501
1431
void MainWindow::propogateMappingUpdate (QString mapping, InputDevice *device) { emit mappingUpdated (mapping, device); }
1502
1432
1503
1433
void MainWindow::testMappingUpdateNow (int index, InputDevice *device)
@@ -1806,26 +1736,6 @@ void MainWindow::updateButtonPressed()
1806
1736
1807
1737
#endif
1808
1738
1809
- /* *
1810
- * @brief Select appropriate tab with the specified index.
1811
- * @param Index of appropriate tab.
1812
- */
1813
- void MainWindow::selectControllerJoyTab (int index)
1814
- {
1815
- if ((index > 0 ) && m_joysticks->contains (index - 1 ))
1816
- {
1817
- JoyTabWidget *widget = qobject_cast<JoyTabWidget *>(ui->tabWidget ->widget (index - 1 )); // static_cast
1818
- if (widget != nullptr )
1819
- {
1820
- qDebug () << " JoyTabWidget was not a null pointer in selectControllerJoyTab of index" ;
1821
- ui->tabWidget ->setCurrentIndex (index - 1 );
1822
- } else
1823
- {
1824
- qDebug () << " JoyTabWidget was a NULL POINTER in selectControllerJoyTab of index" ;
1825
- }
1826
- }
1827
- }
1828
-
1829
1739
/* *
1830
1740
* @brief Select appropriate tab that has a device with the specified GUID.
1831
1741
* @param GUID of joystick device.
0 commit comments