Skip to content

Commit

Permalink
rg_gui: Hide audio sink selection when only one sink is present
Browse files Browse the repository at this point in the history
  • Loading branch information
ducalex committed Jul 21, 2024
1 parent d873ca9 commit d6ac64d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/retro-go/rg_gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,13 @@ static rg_gui_event_t audio_update_cb(rg_gui_option_t *option, rg_gui_event_t ev
int max = count - 1;
int sink = 0;

// If there's no choice to be made we can just hide the entry
if (min == max)
{
option->flags |= RG_DIALOG_FLAG_HIDDEN;
return RG_DIALOG_VOID;
}

for (int i = 0; i < count; ++i)
if (sinks[i].driver == ssink->driver && sinks[i].device == ssink->device)
sink = i;
Expand Down

0 comments on commit d6ac64d

Please sign in to comment.