]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/mainmenu/init.lua
Update my name
[dragonfireclient.git] / builtin / mainmenu / init.lua
index 6ad2aa88a93ffe8bb5c6338515e15a09b80b706e..176796befcce07eebd0345638fecf0a0eaa42524 100644 (file)
@@ -97,7 +97,7 @@ local function init_globals()
 
                local found_singleplayerworld = false
 
-               for world in pairs(world_list) do
+               for i,world in pairs(world_list) do
                        if world.name == "singleplayerworld" then
                                found_singleplayerworld = true
                                gamedata.worldindex = i
@@ -110,10 +110,10 @@ local function init_globals()
 
                        local world_list = core.get_worlds()
 
-                       for world in pairs(world_list) do
+                       for i,world in pairs(world_list) do
                                if world.name == "singleplayerworld" then
                                        gamedata.worldindex = i
-                                       return
+                                       break
                                end
                        end
                end
@@ -140,9 +140,9 @@ local function init_globals()
 
        tv_main:set_global_event_handler(main_event_handler)
 
-       if PLATFORM == "Android" then
-               tv_main:set_fixed_size(false)
-       else
+       tv_main:set_fixed_size(false)
+
+       if not (PLATFORM == "Android") then
                tv_main:set_tab(core.setting_get("maintab_LAST"))
        end
        ui.set_default("maintab")