summaryrefslogtreecommitdiff
path: root/src/smallmap_gui.cpp
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2018-05-04 21:29:22 +0100
committerPeterN <peter@fuzzle.org>2019-01-11 11:56:21 +0000
commit2a8fa5fef9021bff67a13899832bf6f0a18e6ea1 (patch)
treec712f1973d6c74938e968f752a069b499dde7266 /src/smallmap_gui.cpp
parent916e911806083a2fe06a79f6f10e275015079149 (diff)
downloadopenttd-2a8fa5fef9021bff67a13899832bf6f0a18e6ea1.tar.xz
Change: Split up Window::OnTick into OnGameTick and OnRealtimeTick. Adjust timers to work with milliseconds instead of ticks.
Diffstat (limited to 'src/smallmap_gui.cpp')
-rw-r--r--src/smallmap_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smallmap_gui.cpp b/src/smallmap_gui.cpp
index 135d7491c..447d25e4a 100644
--- a/src/smallmap_gui.cpp
+++ b/src/smallmap_gui.cpp
@@ -1570,10 +1570,10 @@ int SmallMapWindow::GetPositionOnLegend(Point pt)
}
}
-/* virtual */ void SmallMapWindow::OnTick()
+/* virtual */ void SmallMapWindow::OnRealtimeTick(uint delta_ms)
{
/* Update the window every now and then */
- if (--this->refresh != 0) return;
+ if (!TimerElapsed(this->refresh, delta_ms)) return;
if (this->map_type == SMT_LINKSTATS) {
uint32 company_mask = this->GetOverlayCompanyMask();