Fix Android main menu crash, and user data directory check.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>master
parent
1c9f05d792
commit
9aaf67ebe0
|
@ -97,7 +97,7 @@ local function init_globals()
|
||||||
|
|
||||||
local found_singleplayerworld = false
|
local found_singleplayerworld = false
|
||||||
|
|
||||||
for world in pairs(world_list) do
|
for i,world in pairs(world_list) do
|
||||||
if world.name == "singleplayerworld" then
|
if world.name == "singleplayerworld" then
|
||||||
found_singleplayerworld = true
|
found_singleplayerworld = true
|
||||||
gamedata.worldindex = i
|
gamedata.worldindex = i
|
||||||
|
@ -110,10 +110,10 @@ local function init_globals()
|
||||||
|
|
||||||
local world_list = core.get_worlds()
|
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
|
if world.name == "singleplayerworld" then
|
||||||
gamedata.worldindex = i
|
gamedata.worldindex = i
|
||||||
return
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1071,6 +1071,8 @@ static bool create_userdata_path()
|
||||||
porting::setExternalStorageDir(porting::jnienv);
|
porting::setExternalStorageDir(porting::jnienv);
|
||||||
if (!fs::PathExists(porting::path_user)) {
|
if (!fs::PathExists(porting::path_user)) {
|
||||||
success = fs::CreateDir(porting::path_user);
|
success = fs::CreateDir(porting::path_user);
|
||||||
|
} else {
|
||||||
|
success = true;
|
||||||
}
|
}
|
||||||
porting::copyAssets();
|
porting::copyAssets();
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue