mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
(menu_animation) Set tween->alive earlier
This commit is contained in:
parent
a926434c4f
commit
969ad47755
@ -452,11 +452,7 @@ static int menu_animation_iterate(struct tween *tween, float dt,
|
||||
if (!tween)
|
||||
return -1;
|
||||
if (tween->running_since >= tween->duration || !tween->alive)
|
||||
{
|
||||
tween->alive = 0;
|
||||
tween->subject = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
tween->running_since += dt;
|
||||
|
||||
@ -470,6 +466,7 @@ static int menu_animation_iterate(struct tween *tween, float dt,
|
||||
if (tween->running_since >= tween->duration)
|
||||
{
|
||||
*tween->subject = tween->target_value;
|
||||
tween->alive = 0;
|
||||
|
||||
if (tween->cb)
|
||||
tween->cb();
|
||||
|
Loading…
Reference in New Issue
Block a user