mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +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)
|
if (!tween)
|
||||||
return -1;
|
return -1;
|
||||||
if (tween->running_since >= tween->duration || !tween->alive)
|
if (tween->running_since >= tween->duration || !tween->alive)
|
||||||
{
|
|
||||||
tween->alive = 0;
|
|
||||||
tween->subject = NULL;
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
|
||||||
|
|
||||||
tween->running_since += dt;
|
tween->running_since += dt;
|
||||||
|
|
||||||
@ -470,6 +466,7 @@ static int menu_animation_iterate(struct tween *tween, float dt,
|
|||||||
if (tween->running_since >= tween->duration)
|
if (tween->running_since >= tween->duration)
|
||||||
{
|
{
|
||||||
*tween->subject = tween->target_value;
|
*tween->subject = tween->target_value;
|
||||||
|
tween->alive = 0;
|
||||||
|
|
||||||
if (tween->cb)
|
if (tween->cb)
|
||||||
tween->cb();
|
tween->cb();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user