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();