summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2021-01-31 16:07:46 +0300
committerSlávek Banko <slavek.banko@axis.cz>2021-02-09 03:48:20 +0100
commit94881853aa5725149305cad34f2d359e66243277 (patch)
treeb3e479830f7d0ddbec2fbc30fa2160ac3b31a3a0 /tdecore/tdehw
parentce15ecab2136c7dc76c1b2e6763ea10bc8318d96 (diff)
downloadtdelibs-94881853aa5725149305cad34f2d359e66243277.tar.gz
tdelibs-94881853aa5725149305cad34f2d359e66243277.zip
tdecore/tdehw: disable SW_RADIO switch if it's the same as SW_RFKILL_ALL
Signed-off-by: Alexander Golubev <fatzer2@gmail.com> (cherry picked from commit ce09b7d5e8a8df11ba58723dbce8e1ea6278b54f)
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdeeventdevice.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdeeventdevice.cpp b/tdecore/tdehw/tdeeventdevice.cpp
index 88509b3ac..cf4517ba8 100644
--- a/tdecore/tdehw/tdeeventdevice.cpp
+++ b/tdecore/tdehw/tdeeventdevice.cpp
@@ -120,9 +120,11 @@ void TDEEventDevice::internalReadProvidedSwitches() {
if (BIT_IS_SET(switches, SW_RFKILL_ALL)) {
supportedSwitches = supportedSwitches | TDESwitchType::RFKill;
}
+# if SW_RADIO != SW_RFKILL_ALL // SW_RADIO is a deprecated name for SW_RFKILL_ALL
if (BIT_IS_SET(switches, SW_RADIO)) {
supportedSwitches = supportedSwitches | TDESwitchType::Radio;
}
+# endif
if (BIT_IS_SET(switches, SW_MICROPHONE_INSERT)) {
supportedSwitches = supportedSwitches | TDESwitchType::MicrophoneInsert;
}
@@ -229,9 +231,11 @@ void TDEEventDevice::internalReadActiveSwitches() {
if (BIT_IS_SET(switches, SW_RFKILL_ALL)) {
activeSwitches = activeSwitches | TDESwitchType::RFKill;
}
+# if SW_RADIO != SW_RFKILL_ALL // SW_RADIO is a deprecated name for SW_RFKILL_ALL
if (BIT_IS_SET(switches, SW_RADIO)) {
activeSwitches = activeSwitches | TDESwitchType::Radio;
}
+# endif
if (BIT_IS_SET(switches, SW_MICROPHONE_INSERT)) {
activeSwitches = activeSwitches | TDESwitchType::MicrophoneInsert;
}