Precise, time period-independent timing for Windows game loop.

This commit is contained in:
Pieter-Jan Briers
2023-07-15 15:22:02 +02:00
parent d7ee2bccd7
commit c392d4f996
8 changed files with 180 additions and 10 deletions

View File

@@ -200,7 +200,12 @@ namespace Robust.Client
// Setup main loop
if (_mainLoop == null)
{
_mainLoop = new GameLoop(_gameTiming, _runtimeLog, _prof, _logManager.GetSawmill("eng"))
_mainLoop = new GameLoop(
_gameTiming,
_runtimeLog,
_prof,
_logManager.GetSawmill("eng"),
GameLoopOptions.FromCVars(_configurationManager))
{
SleepMode = displayMode == DisplayMode.Headless ? SleepMode.Delay : SleepMode.None
};