mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-14 15:17:02 -04:00
Ass support for adoptable storage, let me use my 256 GB !
This commit is contained in:
parent
f7b80d5c52
commit
a477a58b4e
@ -42,8 +42,8 @@ public final class Tools {
|
||||
|
||||
public static final String URL_HOME = "https://pojavlauncherteam.github.io/PojavLauncher";
|
||||
|
||||
public static String DIR_DATA = "/data/data/" + BuildConfig.APPLICATION_ID;
|
||||
public static String MULTIRT_HOME = DIR_DATA+"/runtimes";
|
||||
public static String DIR_DATA; //Initialized later to get context
|
||||
public static String MULTIRT_HOME;
|
||||
public static String LOCAL_RENDERER = null;
|
||||
public static int DEVICE_ARCHITECTURE;
|
||||
|
||||
@ -71,6 +71,18 @@ public final class Tools {
|
||||
|
||||
public static final String LIBNAME_OPTIFINE = "optifine:OptiFine";
|
||||
|
||||
/**
|
||||
* Since some constant requires the use of the Context object
|
||||
* You can call this function to initialize them.
|
||||
* Any value (in)directly dependant on DIR_DATA should be set only here.
|
||||
*/
|
||||
public static void initContextConstants(Context ctx){
|
||||
DIR_DATA = ctx.getFilesDir().getParent();
|
||||
MULTIRT_HOME = DIR_DATA+"/runtimes";
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void launchMinecraft(final LoggableActivity ctx, MinecraftAccount profile, String versionName) throws Throwable {
|
||||
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
|
||||
((ActivityManager)ctx.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(mi);
|
||||
|
@ -30,6 +30,9 @@ public class LauncherPreferences
|
||||
public static int PREF_RAM_ALLOCATION;
|
||||
public static String PREF_DEFAULT_RUNTIME;
|
||||
public static void loadPreferences(Context ctx) {
|
||||
//Required for the data folder.
|
||||
Tools.initContextConstants(ctx);
|
||||
|
||||
PREF_RENDERER = DEFAULT_PREF.getString("renderer", "opengles2");
|
||||
|
||||
PREF_BUTTONSIZE = DEFAULT_PREF.getInt("buttonscale", 100);
|
||||
|
Loading…
x
Reference in New Issue
Block a user