input: fix invalid usage of dev in setTouchDeviceConfigs

ref #6943
This commit is contained in:
Vaxry 2024-07-21 16:45:40 +02:00
parent 043b859ea2
commit efcbcd7297

View file

@ -1488,9 +1488,9 @@ void CInputManager::newTouchDevice(SP<Aquamarine::ITouch> pDevice) {
} }
void CInputManager::setTouchDeviceConfigs(SP<ITouch> dev) { void CInputManager::setTouchDeviceConfigs(SP<ITouch> dev) {
auto setConfig = [&](SP<ITouch> PTOUCHDEV) -> void { auto setConfig = [](SP<ITouch> PTOUCHDEV) -> void {
if (dev->aq() && dev->aq()->getLibinputHandle()) { if (PTOUCHDEV->aq() && PTOUCHDEV->aq()->getLibinputHandle()) {
const auto LIBINPUTDEV = dev->aq()->getLibinputHandle(); const auto LIBINPUTDEV = PTOUCHDEV->aq()->getLibinputHandle();
const auto ENABLED = g_pConfigManager->getDeviceInt(PTOUCHDEV->hlName, "enabled", "input:touchdevice:enabled"); const auto ENABLED = g_pConfigManager->getDeviceInt(PTOUCHDEV->hlName, "enabled", "input:touchdevice:enabled");
const auto mode = ENABLED ? LIBINPUT_CONFIG_SEND_EVENTS_ENABLED : LIBINPUT_CONFIG_SEND_EVENTS_DISABLED; const auto mode = ENABLED ? LIBINPUT_CONFIG_SEND_EVENTS_ENABLED : LIBINPUT_CONFIG_SEND_EVENTS_DISABLED;