fix: active device highlight incorrect when using default device

- mixer.Init: convert database 'default' to '' for SDL default device
- AudioOptions.Init: fallback to first SDL device when current device is default
  and config stores 'default'

Fixes known issue from changelog.txt
This commit is contained in:
NeilClack
2026-07-12 18:15:41 -05:00
parent cbb10ecda3
commit c98b84a3a8
2 changed files with 17 additions and 1 deletions
+5 -1
View File
@@ -64,7 +64,11 @@ func Init(cfg *db.AppConfig, onUpdate func()) error {
logger.Error("Failed to initialize MP3/OGG support: %v", err)
}
if err := openDeviceLocked(cfg.SelectedAudioDevice); err != nil {
deviceName := cfg.SelectedAudioDevice
if deviceName == "default" {
deviceName = ""
}
if err := openDeviceLocked(deviceName); err != nil {
sdl.QuitSubSystem(sdl.INIT_AUDIO)
return err
}