menu_widgets_volume_update_and_show always returns true

This commit is contained in:
twinaphex 2019-08-15 15:46:16 +02:00
parent 6c775ef170
commit edaf8eb702
3 changed files with 14 additions and 10 deletions

View File

@ -1984,7 +1984,7 @@ static void menu_widgets_volume_timer_end(void *userdata)
menu_animation_push(&entry);
}
bool menu_widgets_volume_update_and_show(void)
void menu_widgets_volume_update_and_show(void)
{
settings_t *settings = config_get_ptr();
bool mute = *(audio_get_bool_ptr(AUDIO_ACTION_MUTE_ENABLE));
@ -2004,8 +2004,6 @@ bool menu_widgets_volume_update_and_show(void)
entry.userdata = NULL;
menu_timer_start(&volume_timer, &entry);
return true;
}
static void menu_widgets_screenshot_fadeout(void *userdata)

View File

@ -49,14 +49,10 @@ bool menu_widgets_msg_queue_push(
enum message_queue_category category,
unsigned prio, bool flush);
bool menu_widgets_volume_update_and_show(void);
void menu_widgets_volume_update_and_show(void);
void menu_widgets_iterate(unsigned width, unsigned height);
bool menu_widgets_set_paused(bool is_paused);
bool menu_widgets_set_fast_forward(bool is_fast_forward);
bool menu_widgets_set_rewind(bool is_rewind);
bool menu_widgets_task_msg_queue_push(retro_task_t *task,
const char *msg,
unsigned prio, unsigned duration,

View File

@ -2870,9 +2870,14 @@ static void command_event_set_volume(float gain)
new_volume);
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_inited || !menu_widgets_volume_update_and_show())
if (!menu_widgets_inited)
#endif
{
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
menu_widgets_volume_update_and_show();
#endif
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
RARCH_LOG("%s\n", msg);
@ -4254,9 +4259,14 @@ TODO: Add a setting for these tweaks */
audio_driver_mute_enable = !audio_driver_mute_enable;
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
if (!menu_widgets_volume_update_and_show())
if (!menu_widgets_inited)
#endif
{
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
menu_widgets_volume_update_and_show();
#endif
runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
}
}
break;