aboutsummaryrefslogtreecommitdiffstats
path: root/test-list.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test-list.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test-list.c b/test-list.c
index f604dd9..51ef13b 100644
--- a/test-list.c
+++ b/test-list.c
@@ -9,7 +9,8 @@ int
main(void)
{
char **devices;
- size_t ndevices, i, j;
+ size_t ndevices, i, j, *sound_cards;
+ ssize_t nsound_cards;
struct libgamepad_superdevice device;
if (libgamepad_list_superdevices(&devices, &ndevices)) {
@@ -32,6 +33,14 @@ main(void)
printf("\t%s (LED)\n", device.leds[j]);
for (j = 0; j < device.npower_supplies; j++)
printf("\t%s (PSU)\n", device.power_supplies[j]);
+ nsound_cards = libgamepad_find_sound_devices(device.syspath, &sound_cards);
+ if (nsound_cards < 0) {
+ perror("libgamepad_find_sound_devices");
+ } else {
+ for (j = 0; j < (size_t)nsound_cards; j++)
+ printf("\t%zu (SND)\n", sound_cards[j]);
+ free(sound_cards);
+ }
libgamepad_close_superdevice(&device);
}