Fix hardware volume checkbox not appearing (case mismatch)

Backend returns 'hw (Direct Hardware)' (lowercase) but UI was comparing with 'Hw (Direct Hardware)' (uppercase). Fixed all occurrences to use lowercase.
This commit is contained in:
vicrodh committed 2026-01-19 08:21:40 -06:00
1 parent 45e6df49d5
commit 334a7a7e80
1 file changed
+4 -4
+4 -4
View File
@@ -205,7 +205,7 @@
let exclusiveMode = $state(false); let exclusiveMode = $state(false);
let dacPassthrough = $state(false); let dacPassthrough = $state(false);
let selectedBackend = $state<string>('Auto'); let selectedBackend = $state<string>('Auto');
let selectedAlsaPlugin = $state<string>('Hw (Direct Hardware)'); let selectedAlsaPlugin = $state<string>('hw (Direct Hardware)');
let alsaHardwareVolume = $state(false); let alsaHardwareVolume = $state(false);
// Backend system state // Backend system state
@@ -292,7 +292,7 @@
// Show hardware volume control only for ALSA Direct + Hw plugin (bit-perfect) // Show hardware volume control only for ALSA Direct + Hw plugin (bit-perfect)
let showAlsaHardwareVolume = $derived( let showAlsaHardwareVolume = $derived(
selectedBackend === 'ALSA Direct' && selectedAlsaPlugin === 'Hw (Direct Hardware)' selectedBackend === 'ALSA Direct' && selectedAlsaPlugin === 'hw (Direct Hardware)'
); );
// Smart toggle states - auto-disable incompatible features // Smart toggle states - auto-disable incompatible features
@@ -850,9 +850,9 @@
if (settings.alsa_plugin) { if (settings.alsa_plugin) {
const plugin = alsaPlugins.find(p => p.plugin === settings.alsa_plugin); const plugin = alsaPlugins.find(p => p.plugin === settings.alsa_plugin);
selectedAlsaPlugin = plugin?.name ?? 'Hw (Direct Hardware)'; selectedAlsaPlugin = plugin?.name ?? 'hw (Direct Hardware)';
} else { } else {
selectedAlsaPlugin = 'Hw (Direct Hardware)'; selectedAlsaPlugin = 'hw (Direct Hardware)';
} }
alsaHardwareVolume = settings.alsa_hardware_volume ?? false; alsaHardwareVolume = settings.alsa_hardware_volume ?? false;