mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
Removed the eglSwapInterval call, rewrote v-sync to use the swap interval
This commit is contained in:
parent
96d73f13a3
commit
9e70fc9a8e
Binary file not shown.
@ -1 +1 @@
|
|||||||
1663700709650
|
1664111720511
|
@ -34,7 +34,6 @@ bool gl_init() {
|
|||||||
eglGetError_p());
|
eglGetError_p());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
eglSwapInterval_p(g_EglDisplay, 1);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,7 +414,7 @@ public class Display {
|
|||||||
Display.drawable = drawable;
|
Display.drawable = drawable;
|
||||||
context = org.lwjgl.opengl.GLContext.createFromCurrent();
|
context = org.lwjgl.opengl.GLContext.createFromCurrent();
|
||||||
|
|
||||||
glfwSwapInterval(0);
|
//glfwSwapInterval(0);
|
||||||
glfwShowWindow(Window.handle);
|
glfwShowWindow(Window.handle);
|
||||||
|
|
||||||
Mouse.create();
|
Mouse.create();
|
||||||
@ -762,6 +762,7 @@ public class Display {
|
|||||||
|
|
||||||
public static void setVSyncEnabled(boolean sync) {
|
public static void setVSyncEnabled(boolean sync) {
|
||||||
vsyncEnabled = sync;
|
vsyncEnabled = sync;
|
||||||
|
glfwSwapInterval(vsyncEnabled ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long getWindow() {
|
public static long getWindow() {
|
||||||
@ -1046,9 +1047,9 @@ public class Display {
|
|||||||
* - the desired frame rate, in frames per second
|
* - the desired frame rate, in frames per second
|
||||||
*/
|
*/
|
||||||
public static void sync(int fps) {
|
public static void sync(int fps) {
|
||||||
if (vsyncEnabled)
|
/*if (vsyncEnabled)
|
||||||
Sync.sync(60);
|
Sync.sync(60);
|
||||||
else Sync.sync(fps);
|
else*/ Sync.sync(fps);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Drawable getDrawable() {
|
public static Drawable getDrawable() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user