aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/setup
diff options
context:
space:
mode:
authorGravatar ctrlaltca2024-08-02 14:17:53 +0200
committerGravatar GitHub2024-08-02 14:17:53 +0200
commit1a1db4926d490f81f79ae42b6cf4b850afbaf7df (patch)
tree517df2ef6e641aa15197dca596e9d04afbe033a9 /src/modules/setup
parentAdd support for "Monospace" control code (ASCII 0x11). By now just ignore it.... (diff)
downloadKVIrc-1a1db4926d490f81f79ae42b6cf4b850afbaf7df.tar.gz
KVIrc-1a1db4926d490f81f79ae42b6cf4b850afbaf7df.tar.bz2
KVIrc-1a1db4926d490f81f79ae42b6cf4b850afbaf7df.zip
Misc fixes to sound module related to autodetect (#2669)
* Sound options: don't immediately save changes when sound system gets autodetected; fix #2667 * If the config-saved sound system is not available anymore, force an autodetect; fix #2668 * Fix "qt" sound system under qt6 and unify the code path for Qt5. * If phonon is available, prefer it over "qt" sound system (the latter can only play wav files) * Nuke support for aRts (KDE2/3 sound server) and ESD (Gnome sound server before 2009) * Sound module: replace SoundEffect with QmediaPlayer to support more file formats. Adjust the priority of "qt" sound system in autodetect * Convert to smart pointers * Sound options: force an autodetect if the current sound system is not valid
Diffstat (limited to 'src/modules/setup')
-rw-r--r--src/modules/setup/libkvisetup.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/setup/libkvisetup.cpp b/src/modules/setup/libkvisetup.cpp
index 4c576e3a8..09944bbe5 100644
--- a/src/modules/setup/libkvisetup.cpp
+++ b/src/modules/setup/libkvisetup.cpp
@@ -123,8 +123,14 @@ KVIMODULEEXPORTFUNC void setup_finish()
// detect the most appropriate sound system
KviModule * m = g_pModuleManager->getModule("snd");
- if(m)
- m->ctrl("detectSoundSystem", nullptr);
+ if(m) {
+ QString szSoundSystem;
+ if (m->ctrl("detectSoundSystem", &szSoundSystem) &&
+ !KviQString::equalCI(szSoundSystem, "null"))
+ {
+ KVI_OPTION_STRING(KviOption_stringSoundSystem) = szSoundSystem;
+ }
+ }
}
}