Skip to content

Commit

Permalink
Fix Android main menu crash, and user data directory check.
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
  • Loading branch information
KodexKy authored and Zeno- committed Nov 26, 2014
1 parent 1c9f05d commit 9aaf67e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builtin/mainmenu/init.lua
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Expand Up @@ -1071,6 +1071,8 @@ static bool create_userdata_path()
porting::setExternalStorageDir(porting::jnienv);
if (!fs::PathExists(porting::path_user)) {
success = fs::CreateDir(porting::path_user);
} else {
success = true;
}
porting::copyAssets();
#else
Expand Down

0 comments on commit 9aaf67e

Please sign in to comment.