@@ -370,20 +370,54 @@ void TombRaiderLinuxLauncher::setOptionsClicked() {
370370}
371371
372372void TombRaiderLinuxLauncher::linkClicked () {
373+ qDebug () << " linkClicked()" ;
373374 QModelIndex current = ui->listViewLevels ->currentIndex ();
374375 if (current.isValid ()) {
375376 qint64 id = levelListModel->getLid (current);
376377 if (id != 0 ) {
377- if (settings.value (QString (" level%1/RunnerType" ).arg (id)) == 2 ) {
378+ qint64 type = settings.value (
379+ QString (" level%1/RunnerType" ).arg (id)).toInt ();
380+ qDebug () << " Type was: " << type;
381+ if (type == 0 ) {
378382 Model::getInstance ().runWine (id);
379- } else {
383+ } else if (type == 1 ) {
384+ const QString arg = ui->lineEditEnvironmentVariables ->text ();
385+ QStringList argList = arg.split (
386+ QRegularExpression (" \\ s+" ), Qt::SkipEmptyParts);
387+ Model::getInstance ().runLutris (argList);
388+ } else if (type == 2 ) {
389+ if (!controller.link (id)) {
390+ qDebug () << " link error" ;
391+ }
392+ const QString arg = ui->lineEditEnvironmentVariables ->text ();
393+ QStringList argList = arg.split (
394+ QRegularExpression (" \\ s+" ), Qt::SkipEmptyParts);
395+ Model::getInstance ().runLutris (argList);
396+ } else if (type == 3 ) {
397+ Model::getInstance ().runSteam (id);
398+ } else if (type == 4 ) {
380399 if (levelListModel->getListType ()) {
381400 id = (-1 )*id;
382401 }
383402 if (!controller.link (id)) {
384403 qDebug () << " link error" ;
385404 }
386405 QApplication::quit ();
406+ } else if (type == 5 ) {
407+ if (levelListModel->getListType ()) {
408+ id = (-1 )*id;
409+ }
410+ if (!controller.link (id)) {
411+ qDebug () << " link error" ;
412+ }
413+ } else if (type == 6 ) {
414+ const QString arg = ui->lineEditEnvironmentVariables ->text ();
415+ QStringList argList = arg.split (
416+ QRegularExpression (" \\ s+" ), Qt::SkipEmptyParts);
417+ qDebug () << " args was: " << argList[0 ];
418+ Model::getInstance ().runUmu (id);
419+ } else if (type == 7 ) {
420+ Model::getInstance ().runBash (id);
387421 }
388422 }
389423 }
0 commit comments