From fba6f69d7489020f12977330e39d48bd79c8d08a Mon Sep 17 00:00:00 2001 From: natinusala Date: Mon, 8 Apr 2019 17:01:02 +0200 Subject: [PATCH] menu widgets: reimplement volume widget --- command.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/command.c b/command.c index f9b2095aa3..31879c9adb 100755 --- a/command.c +++ b/command.c @@ -974,7 +974,10 @@ static void command_event_set_volume(float gain) msg_hash_to_str(MSG_AUDIO_VOLUME), new_volume); - runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); +#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS) + if (!video_driver_has_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); @@ -2107,9 +2110,11 @@ TODO: Add a setting for these tweaks */ return false; } - runloop_msg_queue_push(msg, 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); +#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS) + if (!video_driver_has_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); } break; case CMD_EVENT_SEND_DEBUG_INFO: