[Rve-main] question about Effect::animate()
Status: Beta
Brought to you by:
bones0
|
From: Luca A. <luc...@em...> - 2003-10-29 12:52:25
|
Hi all,
I have a (probably stupid) question about the animate() method in the
Effect class.
I see the following code:
t_timer = gettimer_ms(); // actual time
if (t_timer >= t_schedule) {
// ahead of schedule, just wait for the next iteration
msleep(t_timer - t_schedule);
value += delta;
}
shouldn't it be
t_timer = gettimer_ms(); // actual time
if (t_timer <= t_schedule) {
// ahead of schedule, just wait for the next iteration
msleep(t_schedule - t_timer);
value += delta;
}
or someting similar? Maybe I am mistaken, but my intuition is that we
are ahead of schedule if the current time is smaller than the time at
which the effect is scheduled.
A little bit of background: I am using the hscroll_text effect with a
very long title (about 2000 chars). Everything seems to work fine, but
after some time the scrolling title stops. Investigating the problem, I
discovered that rve blocks in Effect::animate(), and in particular in
the msleep() mentioned above. Hence, I am wondering if it is correct or
not...
Luca
--
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
N O W A R ! ! !
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Offerte speciali a partire da 1 euro
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=1648&d=29-10
|