animcur: Return the next interval directly from the timer callback

If the return value is non-zero here, DoTimer() will automatically rearm
the timer for the new (relative) delay. 'soonest' is in absolute time,
so subtract off 'now' and return that.

Reviewed-by: Robert Morell <rmorell@nvidia.com>
Tested-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2017-10-26 13:53:06 -04:00
parent 3abbdb7318
commit cc3241a712

View File

@ -169,10 +169,9 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg)
}
if (activeDevice)
TimerSet(as->timer, TimerAbsolute, soonest, AnimCurTimerNotify, pScreen);
else
as->timer_set = FALSE;
return soonest - now;
as->timer_set = FALSE;
return 0;
}