aboutsummaryrefslogtreecommitdiff
path: root/src/defaultsettings.cpp
Commit message (Expand)AuthorAge
...
* Only set the camera update keymap when using a debug buildrubenwardy2014-11-26
* Simplify loading of Android version of menuShadowNinja2014-11-20
* Add (optional) client-side saving of server map to disksfan52014-11-19
* Replace setting unlimited_player_transfer_distance with player_transfer_distanceSmallJoker2014-11-08
* Add option to enable mesh caching, add wallmounted for meshes.RealBadAngel2014-10-29
* Remove remenants of mob codePavel Puchkin2014-10-23
* Add optional framed glasslike drawtypeBlockMen2014-10-02
* Use configured bind_address for HTTPFetchShadowNinja2014-09-18
* Added configurable selectionbox width. Min width = 1, Max = 5TriBlade92014-09-19
* Node highlighting.RealBadAngel2014-09-17
* Disable preload_item_visuals by defaultShadowNinja2014-08-05
* Remove math mapgenproller2014-07-12
* Add support for Android 2.3+sapier2014-06-29
* Add separate download timeout to allow download of bigger files or on low ban...sapier2014-06-26
* Add setting for tooltips show delay.RealBadAngel2014-06-25
* Support for scalable font and gui elementssapier2014-06-22
* Remove settings not used any longersapier2014-05-24
* Add support for interlaced polarized 3d screenssapier2014-05-18
* Organize builtin into subdirectoriesShadowNinja2014-05-07
* Add proper lua api deprecated handlingsapier2014-04-29
* Add download rate to media progress bar (non http mode only!)sapier2014-04-29
* Add support for dpi based HUD scalingsapier2014-04-27
* Remove liquid_finite and weatherproller2014-04-18
* Add third person viewBlockMen2014-04-12
* Normal maps generation on the fly.RealBadAngel2014-03-21
* Add minetest.set_noiseparam_defaults() Lua APIkwolekr2014-02-15
* Tune block emerge and sending parameters to more aggressive valueskwolekr2014-02-08
* Make flag strings clear specified flag with 'no' prefixkwolekr2014-02-08
* Add the option to bind to a specific addressShadowNinja2014-02-05
* Remove blank default values for emergequeue_limit_* settingskwolekr2014-02-05
* Huge overhaul of the entire MapgenParams systemkwolekr2014-02-03
* Fixed minetest reliable udp implementation (compatible to old clients)sapier2014-01-10
* Revert "Improve (re)spawn, add cache_block_before_spawn and max_spawn_height ...ShadowNinja2014-01-06
* Actually pause singleplayer game in pause menu and use lower maximum FPS in itPerttu Ahola2014-01-06
* Add setting to disable direction dependent fog and sky colorssapier2013-12-15
* Add alpha setting to font shadowBlockMen2013-12-14
* Rewrite client media download and support hash-based remote downloadKahrl2013-12-13
* Implement httpfetch module and initialize it from main()Kahrl2013-12-13
* Add configurable font shadow.Ilya Zhuravlev2013-12-12
* Improve (re)spawn, add cache_block_before_spawn and max_spawn_height settingssweetbomber2013-12-05
* Shaders rework.RealBadAngel2013-12-03
* Split server/client port setting to avoid port number clashes in mainmenusapier2013-11-28
* Increase liquid_loop_max to 10000 againPilzAdam2013-11-17
* Improved default settings for floatland perlin noise 1. Larger, more detailed...proller2013-11-14
* Lower the default max_users from 100 to 15ShadowNinja2013-09-28
* Add configurable PRAGMA synchronous =proller2013-09-17
* Add fallback font support for some languages.Ilya Zhuravlev2013-09-08
* Add a setting for HighPrecisionFPU (fixes #763).Ilya Zhuravlev2013-08-25
* Add ability to activate mods with doubleclick (remove old_style_mod_selection)PilzAdam2013-08-16
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-14
pan class="hl opt">(raw_shortname); if (shortname == "C") return "C"; if (shortname == "") return ""; static std::string last_raw_value = ""; static std::string last_full_name = ""; static bool first_use = true; if (last_raw_value == shortname) { return last_full_name.c_str(); } if (first_use) { EnumSystemLocalesA(UpdateLocaleCallback,LCID_SUPPORTED | LCID_ALTERNATE_SORTS); first_use = false; } last_raw_value = shortname; if (glb_supported_locales.find(narrow_to_wide(shortname)) != glb_supported_locales.end()) { last_full_name = wide_to_narrow(glb_supported_locales[narrow_to_wide(shortname)]); return last_full_name.c_str(); } /* empty string is system default */ errorstream << "MSVC_LocaleLookup: unsupported locale: \"" << shortname << "\" switching to system default!" << std::endl; return ""; } #endif /******************************************************************************/ #ifdef _MSC_VER void init_gettext(const char *path,std::string configured_language,int argc, char** argv) { #else void init_gettext(const char *path,std::string configured_language) { #endif #if USE_GETTEXT /** first try to set user override environment **/ if (configured_language.length() != 0) { #ifndef _WIN32 /* add user specified locale to environment */ setenv("LANGUAGE", configured_language.c_str(), 1); /* reload locale with changed environment */ setlocale(LC_ALL, ""); #elif defined(_MSC_VER) std::string current_language_var(""); if (getenv("LANGUAGE") != 0) { current_language_var = std::string(getenv("LANGUAGE")); } char *lang_str = (char*)calloc(10 + configured_language.length(), sizeof(char)); strcat(lang_str, "LANGUAGE="); strcat(lang_str, configured_language.c_str()); putenv(lang_str); SetEnvironmentVariableA("LANGUAGE",configured_language.c_str()); #ifndef SERVER //very very dirty workaround to force gettext to see the right environment if (current_language_var != configured_language) { STARTUPINFO startupinfo; PROCESS_INFORMATION processinfo; memset(&startupinfo,0,sizeof(startupinfo)); memset(&processinfo,0,sizeof(processinfo)); errorstream << "MSVC localization workaround active restating minetest in new environment!" << std::endl; std::string parameters = ""; for (unsigned int i=1;i < argc; i++) { if (parameters != "") { parameters += " "; } parameters += argv[i]; } const char* ptr_parameters = 0; if (parameters != "") { ptr_parameters = parameters.c_str(); } /** users may start by short name in commandline without extention **/ std::string appname = argv[0]; if (appname.substr(appname.length() -4) != ".exe") { appname += ".exe"; } if (!CreateProcess(appname.c_str(), (char*) ptr_parameters, NULL, NULL, false, DETACHED_PROCESS | CREATE_UNICODE_ENVIRONMENT, NULL, NULL, &startupinfo, &processinfo)) { char buffer[1024]; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), buffer, sizeof(buffer)-1, NULL); errorstream << "*******************************************************" << std::endl; errorstream << "CMD: " << appname << std::endl; errorstream << "Failed to restart with current locale: " << std::endl; errorstream << buffer; errorstream << "Expect language to be broken!" << std::endl; errorstream << "*******************************************************" << std::endl; } else { exit(0); } #else errorstream << "*******************************************************" << std::endl; errorstream << "Can't apply locale workaround for server!" << std::encl; errorstream << "Expect language to be broken!" << std::endl; errorstream << "*******************************************************" << std::endl; #endif } setlocale(LC_ALL,configured_language.c_str()); #else // Mingw char *lang_str = (char*)calloc(10 + configured_language.length(), sizeof(char)); strcat(lang_str, "LANGUAGE="); strcat(lang_str, configured_language.c_str()); putenv(lang_str); setlocale(LC_ALL, ""); #endif // ifndef _WIN32 } else { /* set current system default locale */ setlocale(LC_ALL, ""); } #if defined(_WIN32) if (getenv("LANGUAGE") != 0) { setlocale(LC_ALL, getenv("LANGUAGE")); } #ifdef _MSC_VER else if (getenv("LANG") != 0) { setlocale(LC_ALL, getenv("LANG")); } #endif #endif bindtextdomain(PROJECT_NAME, path); textdomain(PROJECT_NAME); #if defined(_WIN32) // Set character encoding for Win32 char *tdomain = textdomain( (char *) NULL ); if( tdomain == NULL ) { errorstream << "Warning: domainname parameter is the null pointer" << ", default domain is not set" << std::endl; tdomain = (char *) "messages"; } /* char *codeset = */bind_textdomain_codeset( tdomain, "UTF-8" ); //errorstream << "Gettext debug: domainname = " << tdomain << "; codeset = "<< codeset << std::endl; #endif // defined(_WIN32) #else /* set current system default locale */ setlocale(LC_ALL, ""); #endif // if USE_GETTEXT /* no matter what locale is used we need number format to be "C" */ /* to ensure formspec parameters are evaluated correct! */ setlocale(LC_NUMERIC,"C"); infostream << "Message locale is now set to: " << setlocale(LC_ALL,0) << std::endl; }