From 9cb1ebf0c1991808e1abdaedcb3fa7d4af864973 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Sun, 16 May 2021 00:30:08 +0300 Subject: [PATCH] Fixed fast forward not working in single-threaded mode --- src/video/video_driver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video/video_driver.cpp b/src/video/video_driver.cpp index 0af716f05e..0f0bae5413 100644 --- a/src/video/video_driver.cpp +++ b/src/video/video_driver.cpp @@ -101,6 +101,13 @@ void VideoDriver::Tick() { if (!this->is_game_threaded && std::chrono::steady_clock::now() >= this->next_game_tick) { this->GameLoop(); + if (_game_speed > 100) { + // Fast forward by frame skipping, won't be as fast as a separate game thread, but better than nothing + this->GameLoop(); + this->GameLoop(); + this->GameLoop(); + this->GameLoop(); + } /* For things like dedicated server, don't run a separate draw-tick. */ if (!this->HasGUI()) {