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
|
||||
public void onClick(DialogInterface di, int i) {
|
||||
Intent intent = new Intent(BaseLauncherActivity.this, JavaGUILauncherActivity.class);
|
||||
intent.putExtra("skipDetectMod", true);
|
||||
intent.putExtra("javaArgs", edit.getText().toString());
|
||||
startActivity(intent);
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
||||
private File logFile;
|
||||
private PrintStream logStream;
|
||||
|
||||
private boolean isLogAllow, mIsCustomInstall;
|
||||
private boolean isLogAllow, mSkipDetectMod;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@ -54,8 +54,8 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
||||
|
||||
mTextureView = findViewById(R.id.installmod_surfaceview);
|
||||
|
||||
mIsCustomInstall = getIntent().getExtras().getBoolean("customInstall", false);
|
||||
if (mIsCustomInstall) {
|
||||
mSkipDetectMod = getIntent().getExtras().getBoolean("skipDetectMod", false);
|
||||
if (mSkipDetectMod) {
|
||||
JREUtils.redirectAndPrintJRELog(this, null);
|
||||
new Thread(new Runnable(){
|
||||
@Override
|
||||
@ -100,7 +100,7 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
||||
}
|
||||
|
||||
public void closeLogOutput(View view) {
|
||||
if (mIsCustomInstall) {
|
||||
if (mSkipDetectMod) {
|
||||
forceClose(null);
|
||||
} else {
|
||||
contentLog.setVisibility(View.GONE);
|
||||
@ -119,7 +119,8 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
||||
new ForgeInstaller(installer).install(this);
|
||||
} else {
|
||||
isLogAllow = false;
|
||||
mIsCustomInstall = false;
|
||||
mSkipDetectMod = true;
|
||||
JREUtils.redirectAndPrintJRELog(this, null);
|
||||
launchJavaRuntime(modFile, javaArgs);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user