From 32cd52895be9d03a15fa092e22a6602d8603dd61 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Sun, 4 Jan 2015 14:14:33 -0600 Subject: [PATCH] Have Mac and Linux use install wizard destination as fs_basepath --- installwizard.cpp | 7 ++----- installwizard.h | 2 +- mainwindow.cpp | 11 ++++++++++- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/installwizard.cpp b/installwizard.cpp index 349880e..ea69c37 100644 --- a/installwizard.cpp +++ b/installwizard.cpp @@ -46,6 +46,7 @@ InstallWizard::InstallWizard(QWidget *parent, Settings *settings) : ui->setupUi(this); connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel())); + connect(this, SIGNAL(finished(int)), this, SLOT(finished(int))); setPage(Page_Setup, new InstallWizard_Setup(this, settings)); setPage(Page_Eula, new InstallWizard_Eula(this)); @@ -111,14 +112,10 @@ void InstallWizard::cancel() reject(); } -void InstallWizard::on_InstallWizard_finished(int result) +void InstallWizard::finished(int result) { -#ifdef Q_OS_WIN32 if (result == QDialog::Accepted) { settings->setQuakePath(quakePath); } -#else - result = result; // Silence warning. -#endif } diff --git a/installwizard.h b/installwizard.h index f6f5f42..e6e60fb 100644 --- a/installwizard.h +++ b/installwizard.h @@ -62,7 +62,7 @@ public: private slots: void cancel(); - void on_InstallWizard_finished(int result); + void finished(int result); private: Ui::InstallWizard *ui; diff --git a/mainwindow.cpp b/mainwindow.cpp index db0ad12..99c5b07 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -102,7 +102,9 @@ void ioLaunch::on_btnLaunch_clicked() } ioq3 = QString("\"") + settings.getQuakePath() + "/ioquake3.x86.exe\""; -#elif defined Q_OS_MAC +#else + +#if defined Q_OS_MAC ioq3 = "open -a ioquake3 --args"; #elif defined Q_OS_UNIX ioq3 = "ioquake3"; @@ -110,6 +112,13 @@ void ioLaunch::on_btnLaunch_clicked() #error "Unsupported platform" #endif + QString quakePath = settings.getQuakePath(); + if ( !quakePath.isEmpty() ) + { + ioq3 += QString(" +set fs_basepath \"%1\"").arg(quakePath); + } +#endif + int r_mode = settings.getResolutionMode(); int r_width = settings.getResolutionWidth(); int r_height = settings.getResolutionHeight();