mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
W32: Detect ticks wraparound
https://bugzilla.gnome.org/show_bug.cgi?id=748327
This commit is contained in:
parent
83eb36a896
commit
f74f81f06b
@ -178,7 +178,9 @@ _gdk_win32_get_next_tick (gulong suggested_tick)
|
||||
|
||||
if (suggested_tick == 0)
|
||||
suggested_tick = GetTickCount ();
|
||||
if (suggested_tick <= cur_tick)
|
||||
/* Ticks eventually wrap around.
|
||||
* This works as long as the interval between ticks is < 2147483648ms */
|
||||
if (suggested_tick <= cur_tick && ((cur_tick - suggested_tick) < 0x7FFFFFFF))
|
||||
return cur_tick;
|
||||
else
|
||||
return cur_tick = suggested_tick;
|
||||
|
Loading…
Reference in New Issue
Block a user