From 09a4731813cf643bb6ef81ae18888d437867e001 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 29 Apr 2019 11:11:10 +0200 Subject: [PATCH] efl_canvas_animation: reply on the correct API the animation itself does not implement the player interface, and nothing forces it to do so. Additionally, we should ask the reference object for the current progress. Not the animation object. This fixes pos_set / pos_get. Reviewed-by: Mike Blumenkrantz Differential Revision: https://phab.enlightenment.org/D8783 --- src/lib/evas/canvas/efl_canvas_animation_player.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c index 063f932d49..42fb2c4127 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.c +++ b/src/lib/evas/canvas/efl_canvas_animation_player.c @@ -286,9 +286,9 @@ _efl_canvas_animation_player_efl_player_pos_get(const Eo *eo_obj, { //TODO: this is not correct Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj); - double length = efl_player_length_get(anim); + double length = efl_animation_duration_get(anim); - return length * efl_player_progress_get(anim); + return length * efl_player_progress_get(eo_obj); } EOLIAN static void @@ -301,7 +301,7 @@ _efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj, return; EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); - double length = efl_player_length_get(anim); + double length = efl_animation_duration_get(anim); pd->progress = sec / length; efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); }