mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
disable vsync and force maxFps to zero
This commit is contained in:
parent
6753364573
commit
e13c573ecc
|
|
@ -94,7 +94,7 @@ void C4JRender::Initialise()
|
||||||
}
|
}
|
||||||
|
|
||||||
glfwMakeContextCurrent(s_window);
|
glfwMakeContextCurrent(s_window);
|
||||||
glfwSwapInterval(1); // vsync
|
glfwSwapInterval(0); // vsync
|
||||||
|
|
||||||
// Keep viewport in sync with OS-driven window resizes.
|
// Keep viewport in sync with OS-driven window resizes.
|
||||||
glfwSetFramebufferSizeCallback(s_window, onFramebufferResize);
|
glfwSetFramebufferSizeCallback(s_window, onFramebufferResize);
|
||||||
|
|
|
||||||
|
|
@ -1068,11 +1068,11 @@ void GameRenderer::render(float a, bool bFirst)
|
||||||
int xMouse = Mouse::getX() * screenWidth / fbw;
|
int xMouse = Mouse::getX() * screenWidth / fbw;
|
||||||
int yMouse = screenHeight - Mouse::getY() * screenHeight / fbh - 1;
|
int yMouse = screenHeight - Mouse::getY() * screenHeight / fbh - 1;
|
||||||
|
|
||||||
int maxFps = getFpsCap(mc->options->framerateLimit);
|
int maxFps = 0;//getFpsCap(mc->options->framerateLimit);
|
||||||
|
|
||||||
if (mc->level != NULL)
|
if (mc->level != NULL)
|
||||||
{
|
{
|
||||||
if (mc->options->framerateLimit == 0)
|
if (maxFps == 0)
|
||||||
{
|
{
|
||||||
renderLevel(a, 0);
|
renderLevel(a, 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue