Skip to content

Commit

Permalink
Attempt fix, error 139...
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Aug 10, 2020
1 parent cc3d76e commit 97b7b84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class MinecraftEGLInitializer
{
public static void main(final String[] args) throws Throwable {
try {
Tools.datapath = System.getenv("POJAV_DATA_DIR");

// long surfaceAddress = Long.parseLong(args[0]);

// Disable for testing
Expand All @@ -40,7 +42,7 @@ public static void main(final String[] args) throws Throwable {
private volatile long eglContext = 0l;
@Override
public void onSurfaceDestroyed(GL10 gl) {
Log.d("PojavLauncher", "Surface destroyed.");
System.out.println("Surface destroyed.");
}

@Override
Expand Down Expand Up @@ -110,6 +112,7 @@ public void onSurfaceChanged(GL10 gl, int width, int height) {
gtv.setPreserveEGLContextOnPause(true);
gtv.setRenderMode(GLTextureView.RENDERMODE_CONTINUOUSLY);
gtv.setSize(AndroidDisplay.windowWidth, AndroidDisplay.windowHeight);

} catch (Throwable th) {
System.err.println("UNEXCEPTED SHUTTING DOWN");
th.printStackTrace();
Expand Down
7 changes: 2 additions & 5 deletions app/src/main/java/net/kdt/pojavlaunch/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1138,8 +1138,10 @@ public void onPrintLine(String text) {
shell.initInputStream(this);

shell.writeToProcess("base=/system");
shell.writeToProcess("export POJAV_DATA_DIR=" + Tools.datapath);
shell.writeToProcess("export CLASSPATH=" + getApplicationInfo().publicSourceDir); // ":" + launchClassPath + "\n");
shell.writeToProcess("export HOME=" + Tools.MAIN_PATH);
shell.writeToProcess("export MESA_GLSL_CACHE_DIR=$POJAV_DATA_DIR/cache");
String argStr = "";
for (String arg : launchArgs) {
argStr = argStr + " " + arg;
Expand Down Expand Up @@ -1562,11 +1564,6 @@ public void onClick(DialogInterface p1, int p2)

// Toast.makeText(MainActivity.this, "Could not exit. Please force close this app.", Toast.LENGTH_LONG).show();
}

private void fullyExit()
{
// TODO: Implement this method
}
})
.show();
}
Expand Down

0 comments on commit 97b7b84

Please sign in to comment.