From 37587ca8a362f9579795a1d4bc4f387b64d19b34 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 12 Jun 2016 13:55:27 +0200 Subject: [PATCH] Changed: Comments --- code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp index 4cdbf1edc..568bde2ca 100644 --- a/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp +++ b/code/ryzom/tools/client/ryzom_installer/src/mainwindow.cpp @@ -85,17 +85,21 @@ void CMainWindow::onPlayClicked() const CProfile &profile = config->getProfile(profileIndex); + // get full path of client executable QString executable = config->getProfileClientFullPath(profileIndex); if (executable.isEmpty() || !QFile::exists(executable)) return; + // create arguments list QStringList arguments; arguments << "-p"; arguments << profile.id; arguments << profile.arguments.split(' '); + // launch the game with all arguments bool started = QProcess::startDetached(executable, arguments); + // define this profile as default one CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex); }