LWJGLX native changes

This commit is contained in:
khanhduytran0 2020-12-13 08:40:35 +07:00
parent 6e13c23312
commit 77d468243d
5 changed files with 45 additions and 13 deletions

View File

@ -0,0 +1,6 @@
package net.kdt.pojavlaunch;
public class PojavV2Account
{
}

View File

@ -0,0 +1,23 @@
package net.kdt.pojavlaunch.installers;
import android.content.*;
import java.io.*;
import java.util.jar.*;
import net.kdt.pojavlaunch.*;
import java.nio.charset.*;
import net.kdt.pojavlaunch.value.*;
import org.apache.commons.io.*;
import com.google.gson.*;
import java.util.zip.*;
public class LegacyOptifineInstaller extends BaseInstaller {
public LegacyOptifineInstaller(BaseInstaller i) {
from(i);
}
@Override
public int install(JavaGUILauncherActivity ctx) throws IOException {
return 0;
}
}

View File

@ -64,10 +64,6 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglGetCurrentContext(JNIE
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglInit(JNIEnv* env, jclass clazz) {
return JNI_TRUE;
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* env, jclass clazz) {
static const EGLint ctx_attribs[] = {
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE
@ -151,17 +147,24 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
printf("EGLBridge: OpenGL ES from eglQueryContext: %i\n", val);
// assert(val >= 2);
}
// return JNI_TRUE;
printf("EGLBridge: Making current\n");
printf("EGLBridge: EGLContext=%p, EGLDisplay=%p, EGLSurface=%p\n",
potatoBridge.eglContext,
potatoBridge.eglDisplay,
potatoBridge.eglSurface
);
return JNI_TRUE;
}
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* env, jclass clazz, jlong window) {
printf("EGLBridge: Making current\n");
printf("EGLBridge: EGLContext=%p, EGLDisplay=%p, EGLSurface=%p\n",
!window ? EGL_NO_CONTEXT : potatoBridge.eglContext,
potatoBridge.eglDisplay,
potatoBridge.eglSurface
);
EGLBoolean success = eglMakeCurrent(potatoBridge.eglDisplay, potatoBridge.eglSurface, potatoBridge.eglSurface, potatoBridge.eglContext);
EGLBoolean success = eglMakeCurrent(
potatoBridge.eglDisplay,
potatoBridge.eglSurface,
potatoBridge.eglSurface,
!window ? EGL_NO_CONTEXT : potatoBridge.eglContext
);
if (success == EGL_FALSE) {
printf("Error: eglMakeCurrent() failed: %p\n", eglGetError());
}