diff options
author | Maksim <MoNTE48@mail.ua> | 2020-06-20 12:06:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-20 12:06:30 +0200 |
commit | a2199bf62232707e96ece031a00b320d30e34445 (patch) | |
tree | 1be46000240b9a3c5815ca33fc71cdda9a9beb7f /src | |
parent | 57df895cf93d79293a8b47802f9523bafcaa330f (diff) | |
download | minetest-a2199bf62232707e96ece031a00b320d30e34445.tar.gz minetest-a2199bf62232707e96ece031a00b320d30e34445.tar.bz2 minetest-a2199bf62232707e96ece031a00b320d30e34445.zip |
Android: fix TMPFolder path (#10052)
Diffstat (limited to 'src')
-rw-r--r-- | src/defaultsettings.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 5d1795003..abb6593b7 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -451,6 +451,7 @@ void set_default_settings(Settings *settings) settings->setDefault("high_precision_fpu", "true"); settings->setDefault("enable_console", "false"); + settings->setDefault("screen_dpi", "72"); // Altered settings for macOS #if defined(__MACH__) && defined(__APPLE__) @@ -464,7 +465,7 @@ void set_default_settings(Settings *settings) settings->setDefault("screen_h", "0"); settings->setDefault("fullscreen", "true"); settings->setDefault("touchtarget", "true"); - settings->setDefault("TMPFolder", porting::getDataPath("tmp" DIR_DELIM)); + settings->setDefault("TMPFolder", porting::path_cache); settings->setDefault("touchscreen_threshold","20"); settings->setDefault("fixed_virtual_joystick", "false"); settings->setDefault("virtual_joystick_triggers_aux", "false"); @@ -486,8 +487,8 @@ void set_default_settings(Settings *settings) settings->setDefault("curl_verify_cert","false"); // Apply settings according to screen size - float x_inches = ((double) porting::getDisplaySize().X / - (160 * porting::getDisplayDensity())); + float x_inches = (float) porting::getDisplaySize().X / + (160.f * porting::getDisplayDensity()); if (x_inches < 3.7f) { settings->setDefault("hud_scaling", "0.6"); @@ -503,8 +504,5 @@ void set_default_settings(Settings *settings) settings->setDefault("mono_font_size", "14"); } // Tablets >= 6.0 use non-Android defaults for these settings -#else - settings->setDefault("screen_dpi", "72"); #endif } - |