mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
feat: refresh on demand in menu (adaptive framerate)
This commit is contained in:
parent
ba0977a6f0
commit
7fc3703ad2
8 changed files with 56 additions and 16 deletions
|
|
@ -255,8 +255,8 @@ void Engine::updateFrontend() {
|
|||
gui->postAct();
|
||||
}
|
||||
|
||||
void Engine::nextFrame() {
|
||||
windowControl->nextFrame();
|
||||
void Engine::nextFrame(bool waitForRefresh) {
|
||||
windowControl->nextFrame(waitForRefresh);
|
||||
}
|
||||
|
||||
void Engine::startPauseLoop() {
|
||||
|
|
@ -275,7 +275,7 @@ void Engine::startPauseLoop() {
|
|||
if (isHeadless()) {
|
||||
platform::sleep(1.0 / params.tps * 1000);
|
||||
} else {
|
||||
nextFrame();
|
||||
nextFrame(false);
|
||||
}
|
||||
}
|
||||
if (initialCursorLocked) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue