QTfrontend/main.cpp
changeset 3679 acf5acc18522
parent 3350 5cd02aafc612
child 3681 1ee5b476e6b5
equal deleted inserted replaced
3677:7d917b587547 3679:acf5acc18522
   402             cc = QLocale::system().name();
   402             cc = QLocale::system().name();
   403         Translator.load(datadir->absolutePath() + "/Locale/hedgewars_" + cc);
   403         Translator.load(datadir->absolutePath() + "/Locale/hedgewars_" + cc);
   404         app.installTranslator(&Translator);
   404         app.installTranslator(&Translator);
   405     }
   405     }
   406 
   406 
       
   407     // Win32 registry setup (used for xfire detection etc. - don't set it if we're running in "portable" mode with a custom config dir)
       
   408 #ifdef _WIN32
       
   409     if(cConfigDir->length() == 0)
       
   410     {
       
   411         QSettings registry(QSettings::NativeFormat, QSettings::UserScope, "Hedgewars Project", "Hedgewars");
       
   412         QFileInfo f(argv[0]);
       
   413         registry.setValue("file", f.absoluteFilePath());
       
   414         registry.setValue("path", f.absolutePath());
       
   415         registry.setValue("version", cVersionString);
       
   416     }
       
   417 #endif
   407 
   418 
   408     HWForm *Form = new HWForm();
   419     HWForm *Form = new HWForm();
   409 
       
   410 
   420 
   411     Form->show();
   421     Form->show();
   412     return app.exec();
   422     return app.exec();
   413 }
   423 }