mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -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://github.com/PojavLauncherTeam/PojavLauncher/actions)
|
||||||
|
[](https://crowdin.com/project/pojavlauncher)
|
||||||
# PojavLauncher
|
# PojavLauncher
|
||||||
A Minecraft: Java Edition launcher for Android based from Boardwalk. This branch is intended to support 1.13+
|
A Minecraft: Java Edition launcher for Android based from Boardwalk. This branch is intended to support 1.13+
|
||||||
|
|
||||||
|
@ -123,14 +123,17 @@ public class JREUtils
|
|||||||
setEnvironment(launchType, "AWTSTUB_WIDTH", Integer.toString(CallbackBridge.windowWidth));
|
setEnvironment(launchType, "AWTSTUB_WIDTH", Integer.toString(CallbackBridge.windowWidth));
|
||||||
setEnvironment(launchType, "AWTSTUB_HEIGHT", Integer.toString(CallbackBridge.windowHeight));
|
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");
|
||||||
String line;
|
if (customEnvFile.exists() && customEnvFile.isFile()) {
|
||||||
while ((line = reader.readLine()) != null) {
|
BufferedReader reader = new BufferedReader(new FileReader(customEnvFile));
|
||||||
// Not use split() as only split first one
|
String line;
|
||||||
int index = line.indexOf("=");
|
while ((line = reader.readLine()) != null) {
|
||||||
setEnvironment(launchType, line.substring(0, index), line.substring(index + 1));
|
// Not use split() as only split first one
|
||||||
|
int index = line.indexOf("=");
|
||||||
|
setEnvironment(launchType, line.substring(0, index), line.substring(index + 1));
|
||||||
|
}
|
||||||
|
reader.close();
|
||||||
}
|
}
|
||||||
reader.close();
|
|
||||||
|
|
||||||
// REGAL_GL_EXTENSIONS
|
// REGAL_GL_EXTENSIONS
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user