From 2e19d3cf78c759e9583ac113c7a66f3e3e16ccb5 Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 22 Jun 2007 20:04:21 +0000 Subject: (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 --- src/video/win32_v.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/video/win32_v.cpp') diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp index 1508e1ebd..583f7f84b 100644 --- a/src/video/win32_v.cpp +++ b/src/video/win32_v.cpp @@ -795,6 +795,7 @@ static void Win32GdiMainLoop() { MSG mesg; uint32 cur_ticks = GetTickCount(); + uint32 last_cur_ticks = cur_ticks; uint32 next_tick = cur_ticks + 30; _wnd.running = true; @@ -822,6 +823,8 @@ static void Win32GdiMainLoop() } cur_ticks = GetTickCount(); + _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; _ctrl_pressed = _wnd.has_focus && GetAsyncKeyState(VK_CONTROL)<0; -- cgit v1.2.3-54-g00ecf