Fix #116137: Overflow causing event time false positive warnings #116164

Merged
Harley Acheson merged 1 commits from Harley/blender:EventTimeWarning into main 2023-12-13 22:45:59 +01:00
1 changed files with 2 additions and 1 deletions

View File

@ -1323,7 +1323,8 @@ static void ghost_event_proc_timestamp_warning(GHOST_EventHandle ghost_event)
const uint64_t now_ms = GHOST_GetMilliSeconds(g_system);
/* Ensure the reference time occurred in the last #event_time_ok_ms.
* If not, the reference time it's self may be a bad time-stamp. */
if ((event_ms_ref < (now_ms - event_time_ok_ms)) || (event_ms_ref > (now_ms + event_time_ok_ms)))
if (event_ms_ref < event_time_error_ms || (event_ms_ref < (now_ms - event_time_ok_ms)) ||
(event_ms_ref > (now_ms + event_time_ok_ms)))
{
/* Skip, the reference time not recent enough to be used. */
return;