limit adaptive fps to display.framerate setting
This commit is contained in:
parent
630e75c7d9
commit
b0d662f845
@ -83,15 +83,11 @@ void WindowControl::nextFrame(bool waitForRefresh) {
|
||||
const auto& settings = engine.getSettings();
|
||||
auto& window = engine.getWindow();
|
||||
auto& input = engine.getInput();
|
||||
if (waitForRefresh) {
|
||||
window.setFramerate(Window::FPS_UNLIMITED);
|
||||
} else {
|
||||
window.setFramerate(
|
||||
window.isIconified() && settings.display.limitFpsIconified.get()
|
||||
? 20
|
||||
: settings.display.framerate.get()
|
||||
);
|
||||
}
|
||||
window.setFramerate(
|
||||
window.isIconified() && settings.display.limitFpsIconified.get()
|
||||
? 20
|
||||
: settings.display.framerate.get()
|
||||
);
|
||||
window.swapBuffers();
|
||||
input.pollEvents(waitForRefresh && !window.checkShouldRefresh());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user