mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 03:09:08 +00:00
Changed: Comments
This commit is contained in:
parent
a5b252e900
commit
37587ca8a3
1 changed files with 4 additions and 0 deletions
|
@ -85,17 +85,21 @@ void CMainWindow::onPlayClicked()
|
||||||
|
|
||||||
const CProfile &profile = config->getProfile(profileIndex);
|
const CProfile &profile = config->getProfile(profileIndex);
|
||||||
|
|
||||||
|
// get full path of client executable
|
||||||
QString executable = config->getProfileClientFullPath(profileIndex);
|
QString executable = config->getProfileClientFullPath(profileIndex);
|
||||||
|
|
||||||
if (executable.isEmpty() || !QFile::exists(executable)) return;
|
if (executable.isEmpty() || !QFile::exists(executable)) return;
|
||||||
|
|
||||||
|
// create arguments list
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
arguments << "-p";
|
arguments << "-p";
|
||||||
arguments << profile.id;
|
arguments << profile.id;
|
||||||
arguments << profile.arguments.split(' ');
|
arguments << profile.arguments.split(' ');
|
||||||
|
|
||||||
|
// launch the game with all arguments
|
||||||
bool started = QProcess::startDetached(executable, arguments);
|
bool started = QProcess::startDetached(executable, arguments);
|
||||||
|
|
||||||
|
// define this profile as default one
|
||||||
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
|
CConfigFile::getInstance()->setDefaultProfileIndex(profileIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue