mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-05-19 15:34:39 -04:00
Remove awt_xawt
This commit is contained in:
@@ -20,7 +20,7 @@ public class JREUtils
|
||||
}
|
||||
|
||||
public static File redirectStdio(boolean current) throws ErrnoException {
|
||||
File logFile = new File(Tools.datapath, (current ? "current" : "latest") + "log.txt");
|
||||
File logFile = new File(current ? Tools.datapath : Tools.MAIN_PATH, (current ? "current" : "latest") + "log.txt");
|
||||
|
||||
FileDescriptor fd = Os.open(logFile.getAbsolutePath(), OsConstants.O_WRONLY | OsConstants.O_CREAT | OsConstants.O_TRUNC, 0666);
|
||||
Os.dup2(fd, OsConstants.STDERR_FILENO);
|
||||
|
||||
@@ -837,7 +837,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
||||
private FileObserver mLogObserver;
|
||||
private void runCraft() throws Throwable {
|
||||
if (Tools.LAUNCH_TYPE != Tools.LTYPE_PROCESS) {
|
||||
final File currLogFile = JREUtils.redirectStdio(false);
|
||||
final File currLogFile = JREUtils.redirectStdio(true);
|
||||
// DEPRECATED constructor (String) api 29
|
||||
mLogObserver = new FileObserver(currLogFile.getAbsolutePath(), FileObserver.MODIFY){
|
||||
@Override
|
||||
@@ -848,7 +848,8 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
||||
Tools.write(file, "");
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
th.printStackTrace();
|
||||
Tools.showError(MainActivity.this, th);
|
||||
mLogObserver.stopWatching();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user