16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 00:59:18 +02:00

keep timespeed after f6, add fpslimit

This commit is contained in:
milek7
2019-01-29 23:11:44 +01:00
parent 902d536e70
commit bc445893a2
5 changed files with 21 additions and 5 deletions

View File

@@ -172,7 +172,9 @@ eu07_application::run() {
screenshot_man.make_screenshot();
}
Timer::subsystem.mainloop_total.stop();
auto frametime = Timer::subsystem.mainloop_total.stop();
if (Global.minframetime.count() != 0.0f && (Global.minframetime - frametime).count() > 0.0f)
std::this_thread::sleep_for(Global.minframetime - frametime);
}
return 0;