QTfrontend/main.cpp
changeset 3693 09892cdb8f95
parent 3681 1ee5b476e6b5
child 3697 d5b30d6373fc
equal deleted inserted replaced
3680:aaf832c6fbd7 3693:09892cdb8f95
   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     }
       
   416 #endif
   407 
   417 
   408     HWForm *Form = new HWForm();
   418     HWForm *Form = new HWForm();
   409 
       
   410 
   419 
   411     Form->show();
   420     Form->show();
   412     return app.exec();
   421     return app.exec();
   413 }
   422 }