229 |
229 |
230 demo = new QByteArray; |
230 demo = new QByteArray; |
231 QProcess * process; |
231 QProcess * process; |
232 QStringList arguments; |
232 QStringList arguments; |
233 process = new QProcess; |
233 process = new QProcess; |
|
234 connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); |
234 arguments << resolutions[0][config->vid_Resolution()]; |
235 arguments << resolutions[0][config->vid_Resolution()]; |
235 arguments << resolutions[1][config->vid_Resolution()]; |
236 arguments << resolutions[1][config->vid_Resolution()]; |
236 arguments << "16"; |
237 arguments << "16"; |
237 arguments << "46631"; |
238 arguments << "46631"; |
238 arguments << (config->vid_Fullscreen() ? "1" : "0"); |
239 arguments << (config->vid_Fullscreen() ? "1" : "0"); |
239 arguments << (config->isSoundEnabled() ? "1" : "0"); |
240 arguments << (config->isSoundEnabled() ? "1" : "0"); |
240 arguments << tr("en.txt"); |
241 arguments << tr("en.txt"); |
241 process->start(bindir->absolutePath() + "/hwengine", arguments); |
242 process->start(bindir->absolutePath() + "/hwengine", arguments); |
|
243 } |
|
244 |
|
245 void HWGame::StartProcessError(QProcess::ProcessError error) |
|
246 { |
|
247 QMessageBox::critical(0, tr("Error"), |
|
248 tr("Unable to run engine: %1 (") |
|
249 .arg(error) + bindir->absolutePath() + "/hwengine)"); |
242 } |
250 } |
243 |
251 |
244 void HWGame::AddTeam(const QString & teamname) |
252 void HWGame::AddTeam(const QString & teamname) |
245 { |
253 { |
246 if (TeamCount == 5) return; |
254 if (TeamCount == 5) return; |