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:
parent
3abbdb7318
commit
cc3241a712
|
@ -169,10 +169,9 @@ AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (activeDevice)
|
if (activeDevice)
|
||||||
TimerSet(as->timer, TimerAbsolute, soonest, AnimCurTimerNotify, pScreen);
|
return soonest - now;
|
||||||
else
|
|
||||||
as->timer_set = FALSE;
|
|
||||||
|
|
||||||
|
as->timer_set = FALSE;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue