forked from enlightenment/efl
efl_ui/image: fix playback_speed timer calcs
I accidentally inverted this; the frame timing needs to be divided by the playback speed to have the correct time here Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10147
This commit is contained in:
parent
9206960dfa
commit
a4597c8326
|
@ -141,7 +141,7 @@ _efl_ui_image_animate_cb(void *data)
|
|||
(sd->img, sd->cur_frame, 0);
|
||||
|
||||
if (sd->frame_duration > 0)
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed);
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
@ -1762,7 +1762,7 @@ _efl_ui_image_animated_set_internal(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool an
|
|||
evas_object_image_animated_frame_set(sd->img, sd->cur_frame);
|
||||
if (!sd->paused)//legacy
|
||||
sd->anim_timer = ecore_timer_add
|
||||
(sd->frame_duration * sd->playback_speed, _efl_ui_image_animate_cb, obj);
|
||||
(sd->frame_duration / sd->playback_speed, _efl_ui_image_animate_cb, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1821,7 +1821,7 @@ _efl_ui_image_efl_player_playback_speed_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Da
|
|||
efl_player_playback_speed_set(sd->img, factor);
|
||||
else if (sd->anim_timer)
|
||||
{
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed);
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed);
|
||||
ecore_timer_reset(sd->anim_timer);
|
||||
}
|
||||
}
|
||||
|
@ -1881,7 +1881,7 @@ _efl_ui_image_animated_paused_set_internal(Eo *obj, Efl_Ui_Image_Data *sd, Eina_
|
|||
if (!paused)
|
||||
{
|
||||
sd->anim_timer = ecore_timer_add
|
||||
(sd->frame_duration * sd->playback_speed, _efl_ui_image_animate_cb, obj);
|
||||
(sd->frame_duration / sd->playback_speed, _efl_ui_image_animate_cb, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -3035,7 +3035,7 @@ _efl_ui_image_zoomable_animate_cb(void *data)
|
|||
(sd->img, sd->cur_frame, 0);
|
||||
|
||||
if (sd->frame_duration > 0)
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed);
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed);
|
||||
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
@ -3065,7 +3065,7 @@ _efl_ui_image_zoomable_animated_set_internal(Eo *obj EINA_UNUSED, Efl_Ui_Image_Z
|
|||
evas_object_image_animated_frame_set(sd->img, sd->cur_frame);
|
||||
if (!sd->paused)//legacy
|
||||
sd->anim_timer = ecore_timer_add
|
||||
(sd->frame_duration * sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj);
|
||||
(sd->frame_duration / sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3092,7 +3092,7 @@ _efl_ui_image_zoomable_animated_paused_set_internal(Eo *obj, Efl_Ui_Image_Zoomab
|
|||
if (!paused)
|
||||
{
|
||||
sd->anim_timer = ecore_timer_add
|
||||
(sd->frame_duration * sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj);
|
||||
(sd->frame_duration / sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3138,7 +3138,7 @@ _efl_ui_image_zoomable_efl_player_playback_speed_set(Eo *obj EINA_UNUSED, Efl_Ui
|
|||
efl_player_playback_speed_set(sd->edje, factor);
|
||||
else if (sd->anim_timer)
|
||||
{
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed);
|
||||
ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed);
|
||||
ecore_timer_reset(sd->anim_timer);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue