mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -04:00
Some changes
- Fix crashing if custom_env.txt not exists. - Update README.md
This commit is contained in:
parent
ec97d37783
commit
6494950dc1
@ -1,4 +1,5 @@
|
||||
[](https://github.com/PojavLauncherTeam/PojavLauncher/actions)
|
||||
[](https://crowdin.com/project/pojavlauncher)
|
||||
# PojavLauncher
|
||||
A Minecraft: Java Edition launcher for Android based from Boardwalk. This branch is intended to support 1.13+
|
||||
|
||||
|
@ -123,7 +123,9 @@ public class JREUtils
|
||||
setEnvironment(launchType, "AWTSTUB_WIDTH", Integer.toString(CallbackBridge.windowWidth));
|
||||
setEnvironment(launchType, "AWTSTUB_HEIGHT", Integer.toString(CallbackBridge.windowHeight));
|
||||
|
||||
BufferedReader reader = new BufferedReader(new FileReader(new File(Tools.MAIN_PATH, "custom_env.txt")));
|
||||
File customEnvFile = new File(Tools.MAIN_PATH, "custom_env.txt");
|
||||
if (customEnvFile.exists() && customEnvFile.isFile()) {
|
||||
BufferedReader reader = new BufferedReader(new FileReader(customEnvFile));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
// Not use split() as only split first one
|
||||
@ -131,6 +133,7 @@ public class JREUtils
|
||||
setEnvironment(launchType, line.substring(0, index), line.substring(index + 1));
|
||||
}
|
||||
reader.close();
|
||||
}
|
||||
|
||||
// REGAL_GL_EXTENSIONS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user