QTfrontend/main.cpp
changeset 3679 acf5acc18522
parent 3350 5cd02aafc612
child 3681 1ee5b476e6b5
--- a/QTfrontend/main.cpp	Mon Jul 26 11:04:32 2010 +0200
+++ b/QTfrontend/main.cpp	Mon Jul 26 13:03:42 2010 +0200
@@ -404,10 +404,20 @@
         app.installTranslator(&Translator);
     }
 
+    // Win32 registry setup (used for xfire detection etc. - don't set it if we're running in "portable" mode with a custom config dir)
+#ifdef _WIN32
+    if(cConfigDir->length() == 0)
+    {
+        QSettings registry(QSettings::NativeFormat, QSettings::UserScope, "Hedgewars Project", "Hedgewars");
+        QFileInfo f(argv[0]);
+        registry.setValue("file", f.absoluteFilePath());
+        registry.setValue("path", f.absolutePath());
+        registry.setValue("version", cVersionString);
+    }
+#endif
 
     HWForm *Form = new HWForm();
 
-
     Form->show();
     return app.exec();
 }