mirror of
https://github.com/minetest/minetest.git
synced 2024-12-03 13:03:45 +01:00
Display Minetest header when menu_last_game value isn't available anymore (#10751)
This commit is contained in:
parent
8f72d4b294
commit
55dba1bc6d
@ -106,6 +106,16 @@ local function init_globals()
|
|||||||
if last_tab and tv_main.current_tab ~= last_tab then
|
if last_tab and tv_main.current_tab ~= last_tab then
|
||||||
tv_main:set_tab(last_tab)
|
tv_main:set_tab(last_tab)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- In case the folder of the last selected game has been deleted,
|
||||||
|
-- display "Minetest" as a header
|
||||||
|
if tv_main.current_tab == "local" then
|
||||||
|
local game = pkgmgr.find_by_gameid(core.settings:get("menu_last_game"))
|
||||||
|
if game == nil then
|
||||||
|
mm_texture.reset()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
ui.set_default("maintab")
|
ui.set_default("maintab")
|
||||||
tv_main:show()
|
tv_main:show()
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
local enable_gamebar = PLATFORM ~= "Android"
|
local enable_gamebar = PLATFORM ~= "Android"
|
||||||
local current_game, singleplayer_refresh_gamebar
|
local current_game, singleplayer_refresh_gamebar
|
||||||
|
|
||||||
if enable_gamebar then
|
if enable_gamebar then
|
||||||
function current_game()
|
function current_game()
|
||||||
local last_game_id = core.settings:get("menu_last_game")
|
local last_game_id = core.settings:get("menu_last_game")
|
||||||
|
Loading…
Reference in New Issue
Block a user