Merge branch 'master' of github.com:edubart/otclient
This commit is contained in:
commit
e107daf5dd
|
@ -75,12 +75,14 @@ void Engine::run()
|
||||||
update(ticks - lastFrameTicks);
|
update(ticks - lastFrameTicks);
|
||||||
lastFrameTicks = ticks;
|
lastFrameTicks = ticks;
|
||||||
|
|
||||||
// render
|
// render only when visible
|
||||||
|
if(Platform::isWindowVisible()) {
|
||||||
render();
|
render();
|
||||||
|
|
||||||
// swap buffers
|
// swap buffers
|
||||||
Platform::swapBuffers();
|
Platform::swapBuffers();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lastFrameTicks = 0;
|
lastFrameTicks = 0;
|
||||||
m_stopping = false;
|
m_stopping = false;
|
||||||
|
|
Loading…
Reference in New Issue