1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Android: Add support for sharing debug.txt (#12370)

This commit is contained in:
rubenwardy 2022-06-05 17:42:09 +01:00 committed by GitHub
parent a69b7abe00
commit 4baf56520d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 81 additions and 2 deletions

View file

@ -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