mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
menu_widgets: fix crash with tasks
This commit is contained in:
parent
5047d6e709
commit
73ff5334c5
@ -476,7 +476,7 @@ bool menu_widgets_msg_queue_push(
|
||||
menu_animation_ctx_entry_t entry;
|
||||
|
||||
entry.easing_enum = EASING_OUT_QUAD;
|
||||
entry.tag = (uintptr_t) NULL;
|
||||
entry.tag = (uintptr_t) msg_widget;
|
||||
entry.duration = MSG_QUEUE_ANIMATION_DURATION*2;
|
||||
entry.target_value = msg_queue_height/2.0f;
|
||||
entry.subject = &msg_widget->msg_transition_animation;
|
||||
@ -525,7 +525,7 @@ static void menu_widgets_move_end(void *userdata)
|
||||
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
|
||||
entry.easing_enum = EASING_OUT_QUAD;
|
||||
entry.subject = &unfold->unfold;
|
||||
entry.tag = generic_tag;
|
||||
entry.tag = (uintptr_t) unfold;
|
||||
entry.target_value = 1.0f;
|
||||
entry.userdata = unfold;
|
||||
|
||||
@ -577,7 +577,7 @@ static void menu_widgets_msg_queue_move(void)
|
||||
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
|
||||
entry.easing_enum = EASING_OUT_QUAD;
|
||||
entry.subject = &msg->offset_y;
|
||||
entry.tag = generic_tag;
|
||||
entry.tag = (uintptr_t) msg;
|
||||
entry.target_value = y;
|
||||
entry.userdata = unfold;
|
||||
|
||||
@ -609,6 +609,10 @@ static void menu_widgets_msg_queue_free(menu_widget_msg_t *msg, bool touch_list)
|
||||
menu_timer_kill(&msg->hourglass_timer);
|
||||
menu_animation_kill_by_tag(&tag);
|
||||
|
||||
/* Kill all timers */
|
||||
if (msg->expiration_timer_started)
|
||||
menu_timer_kill(&msg->expiration_timer);
|
||||
|
||||
/* Free it */
|
||||
if (msg->msg)
|
||||
free(msg->msg);
|
||||
@ -657,7 +661,7 @@ static void menu_widgets_msg_queue_kill(unsigned idx)
|
||||
entry.cb = NULL;
|
||||
entry.duration = MSG_QUEUE_ANIMATION_DURATION;
|
||||
entry.easing_enum = EASING_OUT_QUAD;
|
||||
entry.tag = generic_tag;
|
||||
entry.tag = (uintptr_t) msg;
|
||||
entry.userdata = NULL;
|
||||
entry.subject = &msg->offset_y;
|
||||
entry.target_value = msg->offset_y - msg_queue_height/4;
|
||||
@ -1933,6 +1937,7 @@ static void menu_widgets_achievement_free(void *userdata)
|
||||
void menu_widgets_free(void)
|
||||
{
|
||||
size_t i;
|
||||
menu_animation_ctx_tag libretro_tag;
|
||||
|
||||
if (!menu_widgets_inited)
|
||||
return;
|
||||
@ -1990,7 +1995,10 @@ void menu_widgets_free(void)
|
||||
generic_message_alpha = 0.0f;
|
||||
|
||||
/* Libretro message */
|
||||
libretro_tag = (uintptr_t) &libretro_message_timer;
|
||||
libretro_message_alpha = 0.0f;
|
||||
menu_timer_kill(&libretro_message_timer);
|
||||
menu_animation_kill_by_tag(&libretro_tag);
|
||||
|
||||
/* Volume */
|
||||
volume_alpha = 0.0f;
|
||||
@ -2174,7 +2182,7 @@ void menu_widgets_start_load_content_animation(const char *content_name, bool re
|
||||
/* Setup the animation */
|
||||
entry.cb = NULL;
|
||||
entry.easing_enum = EASING_OUT_QUAD;
|
||||
entry.tag = (uintptr_t) NULL;
|
||||
entry.tag = generic_tag;
|
||||
entry.userdata = NULL;
|
||||
|
||||
/* Stage one: icon animation */
|
||||
|
Loading…
x
Reference in New Issue
Block a user