From: Mathnerd314 Date: Sun, 21 Feb 2010 23:20:41 +0000 (+0000) Subject: Remove domain from findlocale + some unused stuff under windows X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=1a76aa5a41d4242f5e47fd24cbeae8b9ecdc3b60;p=supertux.git Remove domain from findlocale + some unused stuff under windows SVN-Revision: 6383 --- diff --git a/external/findlocale/findlocale.c b/external/findlocale/findlocale.c index 4b5c816f2..e08ca9da1 100644 --- a/external/findlocale/findlocale.c +++ b/external/findlocale/findlocale.c @@ -105,6 +105,7 @@ accumulate_locstring(const char *str, FL_Locale *l) { return 0; } +#ifndef WIN32 static int accumulate_env(const char *name, FL_Locale *l) { @@ -120,6 +121,7 @@ accumulate_env(const char *name, FL_Locale *l) { return 0; } +#endif static void canonise_fl(FL_Locale *l) { @@ -387,12 +389,12 @@ static int num_primary_to_code = static int num_both_to_code = sizeof(both_to_code) / sizeof(*both_to_code); -static const int +static int lcid_to_fl(LCID lcid, FL_Locale *rtn) { LANGID langid = LANGIDFROMLCID(lcid); LANGID primary_lang = PRIMARYLANGID(langid); - LANGID sub_lang = SUBLANGID(langid); +// LANGID sub_lang = SUBLANGID(langid); int i; /* try to find an exact primary/sublanguage combo that we know about */ for (i=0; ilang = NULL; diff --git a/external/findlocale/findlocale.h b/external/findlocale/findlocale.h index c388deee4..e1ae28524 100644 --- a/external/findlocale/findlocale.h +++ b/external/findlocale/findlocale.h @@ -27,7 +27,7 @@ typedef enum { /* This allocates/fills in a FL_Locale structure with pointers to strings (which should be treated as static), or NULL for inappropriate / undetected fields. */ -FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain); +FL_Success FL_FindLocale(FL_Locale **locale); /* This should be used to free the struct written by FL_FindLocale */ void FL_FreeLocale(FL_Locale **locale); diff --git a/src/supertux/menu/language_menu.cpp b/src/supertux/menu/language_menu.cpp index 136a28468..1f317c295 100644 --- a/src/supertux/menu/language_menu.cpp +++ b/src/supertux/menu/language_menu.cpp @@ -55,7 +55,7 @@ LanguageMenu::menu_action(MenuItem* item) if (item->id == MNID_LANGUAGE_AUTO_DETECT) // auto detect { FL_Locale *locale; - FL_FindLocale(&locale, FL_MESSAGES); + FL_FindLocale(&locale); tinygettext::Language language = tinygettext::Language::from_spec(locale->lang, locale->country, locale->variant); FL_FreeLocale(&locale);