mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
[Android] add option to use obb directory as assets directory for Forge
This commit is contained in:
@@ -215,7 +215,8 @@ public class Main extends AndroidApplication {
|
|||||||
+"LibGDX "+ Version.VERSION+"\n"+"Can't access external storage");
|
+"LibGDX "+ Version.VERSION+"\n"+"Can't access external storage");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String assetsDir = Environment.getExternalStorageDirectory() + "/Forge/";
|
String obbforge = Environment.getExternalStorageDirectory() + "/obbforge"; //if obbforge file exists in Phone Storage, use app-specific Obb directory as path
|
||||||
|
String assetsDir = FileUtil.doesFileExist(obbforge) ? getContext().getObbDir()+"/Forge/" : Environment.getExternalStorageDirectory()+"/Forge/";
|
||||||
if (!FileUtil.ensureDirectoryExists(assetsDir)) {
|
if (!FileUtil.ensureDirectoryExists(assetsDir)) {
|
||||||
//fake init for error message
|
//fake init for error message
|
||||||
//set current orientation
|
//set current orientation
|
||||||
|
|||||||
Reference in New Issue
Block a user