245 .arg(IPCServer->errorString())); |
250 .arg(IPCServer->errorString())); |
246 } |
251 } |
247 |
252 |
248 demo = new QByteArray; |
253 demo = new QByteArray; |
249 QProcess * process; |
254 QProcess * process; |
250 QStringList arguments; |
|
251 process = new QProcess; |
255 process = new QProcess; |
252 connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); |
256 connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError))); |
|
257 QStringList arguments=setArguments(); |
|
258 process->start(bindir->absolutePath() + "/hwengine", arguments); |
|
259 } |
|
260 |
|
261 QStringList HWGame::setArguments() |
|
262 { |
|
263 QStringList arguments; |
253 arguments << resolutions[0][config->vid_Resolution()]; |
264 arguments << resolutions[0][config->vid_Resolution()]; |
254 arguments << resolutions[1][config->vid_Resolution()]; |
265 arguments << resolutions[1][config->vid_Resolution()]; |
255 arguments << "16"; |
266 arguments << "16"; |
256 arguments << "46631"; |
267 arguments << "46631"; |
257 arguments << (config->vid_Fullscreen() ? "1" : "0"); |
268 arguments << (config->vid_Fullscreen() ? "1" : "0"); |
258 arguments << (config->isSoundEnabled() ? "1" : "0"); |
269 arguments << (config->isSoundEnabled() ? "1" : "0"); |
259 arguments << tr("en.txt"); |
270 arguments << tr("en.txt"); |
260 arguments << "128"; |
271 arguments << "128"; |
261 process->start(bindir->absolutePath() + "/hwengine", arguments); |
272 return arguments; |
262 } |
273 } |
263 |
274 |
264 void HWGame::StartProcessError(QProcess::ProcessError error) |
275 void HWGame::StartProcessError(QProcess::ProcessError error) |
265 { |
276 { |
266 QMessageBox::critical(0, tr("Error"), |
277 QMessageBox::critical(0, tr("Error"), |