From ebcbc7497bdb39604ba54758b80bc78e62b17a5f Mon Sep 17 00:00:00 2001 From: Enni Rosario Date: Tue, 31 Oct 2017 17:32:34 +0200 Subject: [PATCH] Indicate selected device when printing. --- src/audio_device.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio_device.c b/src/audio_device.c index 7586293..2fe0ff7 100644 --- a/src/audio_device.c +++ b/src/audio_device.c @@ -481,8 +481,9 @@ void print_devices(ToxWindow *self, DeviceType type) { int i; - for (i = 0; i < size[type]; ++i) - line_info_add(self, NULL, NULL, NULL, SYS_MSG, 0, 0, "%d: %s", i, devices_names[type][i]); + for (i = 0; i < size[type]; ++i) { + line_info_add(self, NULL, NULL, NULL, SYS_MSG, i == primary_device[type] ? 1 : 0, 0, "%d: %s", i, devices_names[type][i]); + } return; }