mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -04:00
Fix errors
This commit is contained in:
parent
0b6701624d
commit
bd16b01c0c
@ -33,7 +33,7 @@ JNIEXPORT void JNICALL Java_net_kdt_pojavlaunch_JREUtils_setupBridgeWindow(JNIEn
|
|||||||
void pojav_openGLOnLoad() {
|
void pojav_openGLOnLoad() {
|
||||||
FILE *fp = fopen ("/sdcard/games/.minecraft/eglout.txt", "w+");
|
FILE *fp = fopen ("/sdcard/games/.minecraft/eglout.txt", "w+");
|
||||||
|
|
||||||
fprintf(fp, "ANativeWindow pointer = %p\n", windowBridge);
|
fprintf(fp, "ANativeWindow pointer = %p\n", potatoBridge.androidWindow);
|
||||||
|
|
||||||
potatoBridge.eglDisplay = eglGetDisplay(potatoBridge.androidDisplay);
|
potatoBridge.eglDisplay = eglGetDisplay(potatoBridge.androidDisplay);
|
||||||
if (potatoBridge.eglDisplay == EGL_NO_DISPLAY) {
|
if (potatoBridge.eglDisplay == EGL_NO_DISPLAY) {
|
||||||
@ -95,7 +95,7 @@ void pojav_openGLOnLoad() {
|
|||||||
assert(val == 2);
|
assert(val == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
potatoBridge.eglSurface = eglCreateWindowSurface(potatoBridge.eglDisplay, config, windowBridge, NULL);
|
potatoBridge.eglSurface = eglCreateWindowSurface(potatoBridge.eglDisplay, config, potatoBridge.androidWindow, NULL);
|
||||||
|
|
||||||
if (!potatoBridge.eglSurface) {
|
if (!potatoBridge.eglSurface) {
|
||||||
fprintf(fp, "Error: eglCreateWindowSurface failed: %p\n", eglGetError());
|
fprintf(fp, "Error: eglCreateWindowSurface failed: %p\n", eglGetError());
|
||||||
@ -120,7 +120,7 @@ void pojav_openGLOnLoad() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Test
|
// Test
|
||||||
glClearColor(0.5f, 0.5f, 0.5f, 1f);
|
glClearColor(0.5f, 0.5f, 0.5f, 1.0f);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
eglSwapBuffers(potatoBridge.eglDisplay, potatoBridge.eglSurface);
|
eglSwapBuffers(potatoBridge.eglDisplay, potatoBridge.eglSurface);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user