mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2026-08-28 05:45:03 -06:00
Removed the eglSwapInterval call, rewrote v-sync to use the swap interval
This commit is contained in:
parent
96d73f13a3
commit
9e70fc9a8e
4 changed files with 5 additions and 5 deletions
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
1663700709650
|
||||
1664111720511
|
||||
|
|
@ -34,7 +34,6 @@ bool gl_init() {
|
|||
eglGetError_p());
|
||||
return false;
|
||||
}
|
||||
eglSwapInterval_p(g_EglDisplay, 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ public class Display {
|
|||
Display.drawable = drawable;
|
||||
context = org.lwjgl.opengl.GLContext.createFromCurrent();
|
||||
|
||||
glfwSwapInterval(0);
|
||||
//glfwSwapInterval(0);
|
||||
glfwShowWindow(Window.handle);
|
||||
|
||||
Mouse.create();
|
||||
|
|
@ -762,6 +762,7 @@ public class Display {
|
|||
|
||||
public static void setVSyncEnabled(boolean sync) {
|
||||
vsyncEnabled = sync;
|
||||
glfwSwapInterval(vsyncEnabled ? 1 : 0);
|
||||
}
|
||||
|
||||
public static long getWindow() {
|
||||
|
|
@ -1046,9 +1047,9 @@ public class Display {
|
|||
* - the desired frame rate, in frames per second
|
||||
*/
|
||||
public static void sync(int fps) {
|
||||
if (vsyncEnabled)
|
||||
/*if (vsyncEnabled)
|
||||
Sync.sync(60);
|
||||
else Sync.sync(fps);
|
||||
else*/ Sync.sync(fps);
|
||||
}
|
||||
|
||||
public static Drawable getDrawable() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue