diff options
author | rubenwardy <rw@rubenwardy.com> | 2022-06-05 17:42:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 17:42:09 +0100 |
commit | 4baf56520d61e22687b563d403f5d873251e135f (patch) | |
tree | 222fc895a63ac842866345d2fe216092f65134f2 /builtin/mainmenu | |
parent | a69b7abe00fb818fd88f3cd04e7f9997ffd21072 (diff) | |
download | minetest-4baf56520d61e22687b563d403f5d873251e135f.tar.gz minetest-4baf56520d61e22687b563d403f5d873251e135f.tar.bz2 minetest-4baf56520d61e22687b563d403f5d873251e135f.zip |
Android: Add support for sharing debug.txt (#12370)
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r-- | builtin/mainmenu/tab_about.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/mainmenu/tab_about.lua b/builtin/mainmenu/tab_about.lua index ba258fd2d..8e6155ea1 100644 --- a/builtin/mainmenu/tab_about.lua +++ b/builtin/mainmenu/tab_about.lua @@ -128,7 +128,9 @@ return { fgettext("Active renderer:") .. "\n" .. core.formspec_escape(core.get_screen_info().render_info) .. "]" - if PLATFORM ~= "Android" then + if PLATFORM == "Android" then + fs = fs .. "button[0,4;3.5,1;share_debug;" .. fgettext("Share debug log") .. "]" + else fs = fs .. "tooltip[userdata;" .. fgettext("Opens the directory that contains user-provided worlds, games, mods,\n" .. "and texture packs in a file manager / explorer.") .. "]" @@ -142,6 +144,11 @@ return { core.open_url("https://www.minetest.net") end + if fields.share_debug then + local path = core.get_user_path() .. DIR_DELIM .. "debug.txt" + core.share_file(path) + end + if fields.userdata then core.open_dir(core.get_user_path()) end |