diff options
author | truelight <truelight@openttd.org> | 2007-06-22 20:04:21 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-22 20:04:21 +0000 |
commit | 2e19d3cf78c759e9583ac113c7a66f3e3e16ccb5 (patch) | |
tree | 487e36c90385f72fecad8d7a35fdb2c0192bec39 /src/video/cocoa_v.mm | |
parent | e90b072c11f842839af974c4db4cff5c42cb49ae (diff) | |
download | openttd-2e19d3cf78c759e9583ac113c7a66f3e3e16ccb5.tar.xz |
(svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
-Codechange: renamed _timer_counter to _palette_animation_counter, as that is what it is
Diffstat (limited to 'src/video/cocoa_v.mm')
-rw-r--r-- | src/video/cocoa_v.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video/cocoa_v.mm b/src/video/cocoa_v.mm index f4dfc5b77..8e13605d8 100644 --- a/src/video/cocoa_v.mm +++ b/src/video/cocoa_v.mm @@ -685,6 +685,7 @@ static bool QZ_PollEvent() static void QZ_GameLoop() { uint32 cur_ticks = GetTick(); + uint32 last_cur_ticks = cur_ticks; uint32 next_tick = cur_ticks + 30; uint32 pal_tick = 0; #ifdef _DEBUG @@ -731,6 +732,8 @@ static void QZ_GameLoop() } cur_ticks = GetTick(); + _realtime_tick += cur_ticks - last_cur_ticks; + last_cur_ticks = cur_ticks; if (cur_ticks >= next_tick || (_fast_forward && !_pause_game) || cur_ticks < prev_cur_ticks) { next_tick = cur_ticks + 30; |