mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-timeline.c (timeline_timeout_func): Fix check if the last frame was reached by skipping a frame (#654, Johan Bilien)
This commit is contained in:
parent
dd5bad99d2
commit
eba7612388
@ -1,3 +1,9 @@
|
|||||||
|
2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
|
* clutter/clutter-timeline.c (timeline_timeout_func): Fix
|
||||||
|
check if the last frame was reached by skipping a frame (#654,
|
||||||
|
Johan Bilien)
|
||||||
|
|
||||||
2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
|
2008-01-14 Emmanuele Bassi <ebassi@openedhand.com>
|
||||||
|
|
||||||
* clutter/clutter-shader.c: Use correct format string for
|
* clutter/clutter-shader.c: Use correct format string for
|
||||||
|
@ -551,31 +551,26 @@ timeline_timeout_func (gpointer data)
|
|||||||
((priv->direction == CLUTTER_TIMELINE_BACKWARD) &&
|
((priv->direction == CLUTTER_TIMELINE_BACKWARD) &&
|
||||||
(priv->current_frame_num < 0)))
|
(priv->current_frame_num < 0)))
|
||||||
{
|
{
|
||||||
guint frame_diff = 0;
|
|
||||||
|
|
||||||
if (priv->direction == CLUTTER_TIMELINE_FORWARD)
|
if (priv->direction == CLUTTER_TIMELINE_FORWARD)
|
||||||
{
|
{
|
||||||
frame_diff = priv->current_frame_num - priv->n_frames;
|
|
||||||
priv->current_frame_num = priv->n_frames;
|
priv->current_frame_num = priv->n_frames;
|
||||||
}
|
}
|
||||||
else if (priv->direction == CLUTTER_TIMELINE_BACKWARD)
|
else if (priv->direction == CLUTTER_TIMELINE_BACKWARD)
|
||||||
{
|
{
|
||||||
frame_diff = priv->current_frame_num * -1;
|
|
||||||
priv->current_frame_num = 0;
|
priv->current_frame_num = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CLUTTER_NOTE (SCHEDULER,
|
CLUTTER_NOTE (SCHEDULER,
|
||||||
"Timeline [%p] completed (cur: %d, tot: %d, drop: %d, diff: %d)",
|
"Timeline [%p] completed (cur: %d, tot: %d, drop: %d)",
|
||||||
timeline,
|
timeline,
|
||||||
priv->current_frame_num,
|
priv->current_frame_num,
|
||||||
priv->n_frames,
|
priv->n_frames,
|
||||||
n_frames - 1,
|
n_frames - 1);
|
||||||
frame_diff);
|
|
||||||
|
|
||||||
/* if we skipped some frame to get here let's see whether we still need
|
/* if we skipped some frame to get here let's see whether we still need
|
||||||
* to emit the last new-frame signal with the last frame
|
* to emit the last new-frame signal with the last frame
|
||||||
*/
|
*/
|
||||||
if (frame_diff > 1)
|
if (n_frames > 1)
|
||||||
{
|
{
|
||||||
g_signal_emit (timeline, timeline_signals[NEW_FRAME], 0,
|
g_signal_emit (timeline, timeline_signals[NEW_FRAME], 0,
|
||||||
priv->current_frame_num);
|
priv->current_frame_num);
|
||||||
|
Loading…
Reference in New Issue
Block a user