Bug #853
* clutter/clutter-timeline.c (clutter_timeline_get_progressx): Fix arithmetic for calculating the reverse progress when the timeline is backward. (Should subtract from one instead of taking the reciprocal).
This commit is contained in:
parent
0b8a500fca
commit
f7b53e6004
@ -1,3 +1,12 @@
|
|||||||
|
2008-04-14 Neil Roberts <neil@o-hand.com>
|
||||||
|
|
||||||
|
Bug #853
|
||||||
|
|
||||||
|
* clutter/clutter-timeline.c (clutter_timeline_get_progressx): Fix
|
||||||
|
arithmetic for calculating the reverse progress when the timeline
|
||||||
|
is backward. (Should subtract from one instead of taking the
|
||||||
|
reciprocal).
|
||||||
|
|
||||||
2008-04-13 Neil Roberts <neil@o-hand.com>
|
2008-04-13 Neil Roberts <neil@o-hand.com>
|
||||||
|
|
||||||
Upgraded the Win32 backend to work with the multi-stage
|
Upgraded the Win32 backend to work with the multi-stage
|
||||||
|
@ -1304,17 +1304,19 @@ ClutterFixed
|
|||||||
clutter_timeline_get_progressx (ClutterTimeline *timeline)
|
clutter_timeline_get_progressx (ClutterTimeline *timeline)
|
||||||
{
|
{
|
||||||
ClutterTimelinePrivate *priv;
|
ClutterTimelinePrivate *priv;
|
||||||
|
ClutterFixed progress;
|
||||||
|
|
||||||
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), 0);
|
g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), 0);
|
||||||
|
|
||||||
priv = timeline->priv;
|
priv = timeline->priv;
|
||||||
|
|
||||||
if (priv->direction == CLUTTER_TIMELINE_FORWARD)
|
progress = CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (priv->current_frame_num),
|
||||||
return CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (priv->current_frame_num),
|
CLUTTER_INT_TO_FIXED (priv->n_frames));
|
||||||
CLUTTER_INT_TO_FIXED (priv->n_frames));
|
|
||||||
else
|
if (priv->direction == CLUTTER_TIMELINE_BACKWARD)
|
||||||
return CLUTTER_FIXED_DIV (CLUTTER_INT_TO_FIXED (priv->n_frames),
|
progress = CFX_ONE - progress;
|
||||||
CLUTTER_INT_TO_FIXED (priv->current_frame_num));
|
|
||||||
|
return progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user