mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 23:59:21 -04:00
Bug fix: Launch use custom arguments
This commit is contained in:
parent
b5d3e4b1f3
commit
d456317389
@ -114,6 +114,7 @@ public abstract class BaseLauncherActivity extends BaseActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface di, int i) {
|
public void onClick(DialogInterface di, int i) {
|
||||||
Intent intent = new Intent(BaseLauncherActivity.this, JavaGUILauncherActivity.class);
|
Intent intent = new Intent(BaseLauncherActivity.this, JavaGUILauncherActivity.class);
|
||||||
|
intent.putExtra("skipDetectMod", true);
|
||||||
intent.putExtra("javaArgs", edit.getText().toString());
|
intent.putExtra("javaArgs", edit.getText().toString());
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
|||||||
private File logFile;
|
private File logFile;
|
||||||
private PrintStream logStream;
|
private PrintStream logStream;
|
||||||
|
|
||||||
private boolean isLogAllow, mIsCustomInstall;
|
private boolean isLogAllow, mSkipDetectMod;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -54,8 +54,8 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
|||||||
|
|
||||||
mTextureView = findViewById(R.id.installmod_surfaceview);
|
mTextureView = findViewById(R.id.installmod_surfaceview);
|
||||||
|
|
||||||
mIsCustomInstall = getIntent().getExtras().getBoolean("customInstall", false);
|
mSkipDetectMod = getIntent().getExtras().getBoolean("skipDetectMod", false);
|
||||||
if (mIsCustomInstall) {
|
if (mSkipDetectMod) {
|
||||||
JREUtils.redirectAndPrintJRELog(this, null);
|
JREUtils.redirectAndPrintJRELog(this, null);
|
||||||
new Thread(new Runnable(){
|
new Thread(new Runnable(){
|
||||||
@Override
|
@Override
|
||||||
@ -100,7 +100,7 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void closeLogOutput(View view) {
|
public void closeLogOutput(View view) {
|
||||||
if (mIsCustomInstall) {
|
if (mSkipDetectMod) {
|
||||||
forceClose(null);
|
forceClose(null);
|
||||||
} else {
|
} else {
|
||||||
contentLog.setVisibility(View.GONE);
|
contentLog.setVisibility(View.GONE);
|
||||||
@ -119,7 +119,8 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
|||||||
new ForgeInstaller(installer).install(this);
|
new ForgeInstaller(installer).install(this);
|
||||||
} else {
|
} else {
|
||||||
isLogAllow = false;
|
isLogAllow = false;
|
||||||
mIsCustomInstall = false;
|
mSkipDetectMod = true;
|
||||||
|
JREUtils.redirectAndPrintJRELog(this, null);
|
||||||
launchJavaRuntime(modFile, javaArgs);
|
launchJavaRuntime(modFile, javaArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user