QTfrontend/game.cpp
changeset 110 330a2dbacd67
parent 97 e7c1df9cce2c
child 116 00d3d6d2e699
--- a/QTfrontend/game.cpp	Sat Aug 12 17:41:02 2006 +0000
+++ b/QTfrontend/game.cpp	Mon Aug 14 14:49:40 2006 +0000
@@ -231,6 +231,7 @@
 	QProcess * process;
 	QStringList arguments;
 	process = new QProcess;
+	connect(process, SIGNAL(error(QProcess::ProcessError)), this, SLOT(StartProcessError(QProcess::ProcessError)));
 	arguments << resolutions[0][config->vid_Resolution()];
 	arguments << resolutions[1][config->vid_Resolution()];
 	arguments << "16";
@@ -241,6 +242,13 @@
 	process->start(bindir->absolutePath() + "/hwengine", arguments);
 }
 
+void HWGame::StartProcessError(QProcess::ProcessError error)
+{
+	QMessageBox::critical(0, tr("Error"),
+				tr("Unable to run engine: %1 (")
+				.arg(error) + bindir->absolutePath() + "/hwengine)");
+}
+
 void HWGame::AddTeam(const QString & teamname)
 {
 	if (TeamCount == 5) return;