(Menu widgets) Refactor
This commit is contained in:
parent
31a7e5628c
commit
5d5200d20b
|
@ -2227,10 +2227,9 @@ static void menu_widgets_volume_timer_end(void *userdata)
|
||||||
gfx_animation_push(&entry);
|
gfx_animation_push(&entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_widgets_volume_update_and_show(float new_volume)
|
void menu_widgets_volume_update_and_show(float new_volume, bool mute)
|
||||||
{
|
{
|
||||||
gfx_timer_ctx_entry_t entry;
|
gfx_timer_ctx_entry_t entry;
|
||||||
bool mute = *(audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE));
|
|
||||||
|
|
||||||
gfx_animation_kill_by_tag(&volume_tag);
|
gfx_animation_kill_by_tag(&volume_tag);
|
||||||
|
|
||||||
|
@ -2273,8 +2272,7 @@ bool menu_widgets_ai_service_overlay_load(
|
||||||
{
|
{
|
||||||
if (ai_service_overlay_state == 0)
|
if (ai_service_overlay_state == 0)
|
||||||
{
|
{
|
||||||
bool res;
|
bool res = gfx_display_reset_textures_list_buffer(
|
||||||
res = gfx_display_reset_textures_list_buffer(
|
|
||||||
&ai_service_overlay_texture,
|
&ai_service_overlay_texture,
|
||||||
TEXTURE_FILTER_MIPMAP_LINEAR,
|
TEXTURE_FILTER_MIPMAP_LINEAR,
|
||||||
(void *) buffer, buffer_len, image_type,
|
(void *) buffer, buffer_len, image_type,
|
||||||
|
|
|
@ -48,7 +48,8 @@ void menu_widgets_msg_queue_push(
|
||||||
enum message_queue_category category,
|
enum message_queue_category category,
|
||||||
unsigned prio, bool flush);
|
unsigned prio, bool flush);
|
||||||
|
|
||||||
void menu_widgets_volume_update_and_show(float new_volume);
|
void menu_widgets_volume_update_and_show(float new_volume,
|
||||||
|
bool mute);
|
||||||
|
|
||||||
void menu_widgets_iterate(
|
void menu_widgets_iterate(
|
||||||
unsigned width, unsigned height,
|
unsigned width, unsigned height,
|
||||||
|
|
|
@ -5428,7 +5428,9 @@ static void command_event_set_volume(float gain)
|
||||||
|
|
||||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||||
if (menu_widgets_inited)
|
if (menu_widgets_inited)
|
||||||
menu_widgets_volume_update_and_show(settings->floats.audio_volume);
|
menu_widgets_volume_update_and_show(settings->floats.audio_volume,
|
||||||
|
audio_driver_mute_enable
|
||||||
|
);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
@ -6912,7 +6914,9 @@ TODO: Add a setting for these tweaks */
|
||||||
|
|
||||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||||
if (menu_widgets_inited)
|
if (menu_widgets_inited)
|
||||||
menu_widgets_volume_update_and_show(configuration_settings->floats.audio_volume);
|
menu_widgets_volume_update_and_show(
|
||||||
|
configuration_settings->floats.audio_volume,
|
||||||
|
audio_driver_mute_enable);
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||||
|
|
Loading…
Reference in New Issue