#include <binreloc.h>
#include <tinygettext/log.hpp>
#include <boost/format.hpp>
+extern "C" {
+#include <findlocale.h>
+}
#include "supertux/main.hpp"
if (g_config->locale != "")
{
dictionary_manager->set_language(tinygettext::Language::from_name(g_config->locale));
+ } else {
+ FL_Locale *locale;
+ FL_FindLocale(&locale);
+ tinygettext::Language language = tinygettext::Language::from_spec( locale->lang?locale->lang:"", locale->country?locale->country:"", locale->variant?locale->variant:"");
+ FL_FreeLocale(&locale);
+ dictionary_manager->set_language(language);
}
}
if(pre_parse_commandline(argc, argv))
return 0;
- Console::instance = new Console();
init_sdl();
+ Console::instance = new Console();
timelog("controller");
g_jk_controller = new JoystickKeyboardController();
timelog("config");
init_config();
- timelog("addons");
- AddonManager::get_instance().load_addons();
-
- timelog("tinygettext");
- init_tinygettext();
-
timelog("commandline");
if(parse_commandline(argc, argv))
return 0;
- timelog("audio");
- init_audio();
-
timelog("video");
DrawingContext context;
context_pointer = &context;
init_video();
+
+ timelog("audio");
+ init_audio();
+
+ timelog("tinygettext");
+ init_tinygettext();
Console::instance->init_graphics();
timelog("resources");
Resources::load_shared();
+
+ timelog("addons");
+ AddonManager::get_instance().load_addons();
timelog(0);