setupBridgeEGL

This commit is contained in:
khanhduytran0 2020-08-27 17:51:18 +07:00
parent 332f8c300d
commit b25e8ebf34
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package net.kdt.pojavlaunch;
import android.system.*;
import java.io.*;
// This clads should be named as 'LoadMe' as original
public class BinaryExecutor
{
private BinaryExecutor() {}

View File

@ -689,6 +689,11 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
// Does it required anymore?
// AndroidDisplay.windowWidth += navBarHeight;
if (LAUNCH_TYPE != LTYPE_PROCESS) {
BinaryExecutor.setupBridgeEGL();
egl10.eglMakeCurrent(theEgl.eglGetCurrentDisplay(), EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
}
new Thread(new Runnable(){
@Override
@ -1095,7 +1100,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
if (exitCode != 0) {
Tools.showError(this, new ErrnoException("java", exitCode), false);
}
} else { // Type Invocation or BinaryExec
} else { // Type Invocation
final FileDescriptor logFile = BinaryExecutor.redirectStdio();
new Thread(new Runnable() {