From 8714f7969376273505dec33fca92dd8395c335ca Mon Sep 17 00:00:00 2001 From: OBattler Date: Mon, 4 Apr 2022 18:15:41 +0200 Subject: [PATCH] Phase 2 (Bug fix and Sound). --- src/device.c | 3 ++- src/sound/sound.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/device.c b/src/device.c index 75ea59ff4..501ae6b64 100644 --- a/src/device.c +++ b/src/device.c @@ -343,6 +343,7 @@ int device_has_config(const device_t *d) { int c = 0; + device_config_t *config; if (d == NULL) return 0; @@ -350,7 +351,7 @@ device_has_config(const device_t *d) if (d->config == NULL) return 0; - config = d->config; + config = (device_config_t *) d->config; while (config->type != -1) { if (config->type != CONFIG_MAC) diff --git a/src/sound/sound.c b/src/sound/sound.c index 5a3e978f6..5110b9c59 100644 --- a/src/sound/sound.c +++ b/src/sound/sound.c @@ -186,7 +186,7 @@ sound_card_has_config(int card) { if (!sound_cards[card].device) return 0; - return sound_cards[card].device->config ? 1 : 0; + return device_has_config(sound_cards[card].device) ? 1 : 0; } char *