summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-10-17 18:44:39 +0100
committerCharles Pigott <charlespigott@googlemail.com>2021-10-17 19:25:03 +0100
commit86c295bb3b4833126fe18be8947df38b51cec35b (patch)
treed3789c977e82031867c71546b8d14dbba1759cf4 /src/video
parente09f251fc6da7026922a431def468fdbcee2d3d0 (diff)
downloadopenttd-86c295bb3b4833126fe18be8947df38b51cec35b.tar.xz
Change: Ignore refresh_rate setting when vsync is enabled
Diffstat (limited to 'src/video')
-rw-r--r--src/video/video_driver.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp
index b87dc7052..458c67402 100644
--- a/src/video/video_driver.hpp
+++ b/src/video/video_driver.hpp
@@ -316,6 +316,8 @@ protected:
std::chrono::steady_clock::duration GetDrawInterval()
{
+ /* If vsync, draw interval is decided by the display driver */
+ if (_video_vsync && _video_hw_accel) return std::chrono::microseconds(0);
return std::chrono::microseconds(1000000 / _settings_client.gui.refresh_rate);
}