mirror of
https://github.com/libretro/RetroArch
synced 2025-02-12 00:40:26 +00:00
(gfx widgets) Cleanups
This commit is contained in:
parent
4524ff7cd7
commit
ddf45fdad2
@ -701,9 +701,7 @@ static void gfx_widgets_msg_queue_kill_end(void *userdata)
|
|||||||
menu_widget_msg_t *msg = (menu_widget_msg_t*)
|
menu_widget_msg_t *msg = (menu_widget_msg_t*)
|
||||||
current_msgs->list[msg_queue_kill].userdata;
|
current_msgs->list[msg_queue_kill].userdata;
|
||||||
|
|
||||||
if (!msg)
|
if (msg)
|
||||||
return;
|
|
||||||
|
|
||||||
gfx_widgets_msg_queue_free(msg, true);
|
gfx_widgets_msg_queue_free(msg, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,11 +899,10 @@ float gfx_widgets_get_thumbnail_scale_factor(
|
|||||||
return (dst_width / image_width);
|
return (dst_width / image_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gfx_widgets_start_msg_expiration_timer(menu_widget_msg_t *msg_widget, unsigned duration)
|
static void gfx_widgets_start_msg_expiration_timer(
|
||||||
|
menu_widget_msg_t *msg_widget, unsigned duration)
|
||||||
{
|
{
|
||||||
gfx_timer_ctx_entry_t timer;
|
gfx_timer_ctx_entry_t timer;
|
||||||
if (msg_widget->expiration_timer_started)
|
|
||||||
return;
|
|
||||||
|
|
||||||
timer.cb = gfx_widgets_msg_queue_expired;
|
timer.cb = gfx_widgets_msg_queue_expired;
|
||||||
timer.duration = duration;
|
timer.duration = duration;
|
||||||
@ -1045,6 +1042,7 @@ void gfx_widgets_iterate(
|
|||||||
/* Start expiration timer if not associated to a task */
|
/* Start expiration timer if not associated to a task */
|
||||||
if (!msg_widget->task_ptr)
|
if (!msg_widget->task_ptr)
|
||||||
{
|
{
|
||||||
|
if (!msg_widget->expiration_timer_started)
|
||||||
gfx_widgets_start_msg_expiration_timer(
|
gfx_widgets_start_msg_expiration_timer(
|
||||||
msg_widget, MSG_QUEUE_ANIMATION_DURATION * 2
|
msg_widget, MSG_QUEUE_ANIMATION_DURATION * 2
|
||||||
+ msg_widget->duration);
|
+ msg_widget->duration);
|
||||||
@ -1071,6 +1069,7 @@ void gfx_widgets_iterate(
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (msg->task_ptr && (msg->task_finished || msg->task_cancelled))
|
if (msg->task_ptr && (msg->task_finished || msg->task_cancelled))
|
||||||
|
if (!msg_widget->expiration_timer_started)
|
||||||
gfx_widgets_start_msg_expiration_timer(msg, TASK_FINISHED_DURATION);
|
gfx_widgets_start_msg_expiration_timer(msg, TASK_FINISHED_DURATION);
|
||||||
|
|
||||||
if (msg->expired && !widgets_moving)
|
if (msg->expired && !widgets_moving)
|
||||||
@ -2316,14 +2315,14 @@ void gfx_widgets_cleanup_load_content_animation(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void gfx_widgets_start_load_content_animation(const char *content_name, bool remove_extension)
|
void gfx_widgets_start_load_content_animation(
|
||||||
|
const char *content_name, bool remove_extension)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
/* TODO: finish the animation based on design, correct all timings */
|
/* TODO: finish the animation based on design, correct all timings */
|
||||||
|
int i;
|
||||||
gfx_animation_ctx_entry_t entry;
|
gfx_animation_ctx_entry_t entry;
|
||||||
gfx_timer_ctx_entry_t timer_entry;
|
gfx_timer_ctx_entry_t timer_entry;
|
||||||
int i;
|
|
||||||
|
|
||||||
float icon_color[16] = COLOR_HEX_TO_FLOAT(0x0473C9, 1.0f); /* TODO: random color */
|
float icon_color[16] = COLOR_HEX_TO_FLOAT(0x0473C9, 1.0f); /* TODO: random color */
|
||||||
unsigned timing = 0;
|
unsigned timing = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user