From ce09b7d5e8a8df11ba58723dbce8e1ea6278b54f Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Sun, 31 Jan 2021 16:07:46 +0300 Subject: [PATCH] tdecore/tdehw: disable SW_RADIO switch if it's the same as SW_RFKILL_ALL Signed-off-by: Alexander Golubev --- tdecore/tdehw/tdeeventdevice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdecore/tdehw/tdeeventdevice.cpp b/tdecore/tdehw/tdeeventdevice.cpp index ac92599ae..c528a42db 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; }