From 6a01c399a971a57854fb4a99ce246534139beda4 Mon Sep 17 00:00:00 2001 From: epsilonshmepsilon <82274744+epsilonshmepsilon@users.noreply.github.com> Date: Fri, 10 Oct 2025 17:05:51 +0200 Subject: input: add option to rotate device input (#11947) --- src/managers/input/InputManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/managers/input/InputManager.cpp') diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index fa7efb6a..63e08154 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -1279,6 +1279,11 @@ void CInputManager::setPointerConfigs() { const auto LIBINPUTSENS = std::clamp(g_pConfigManager->getDeviceFloat(devname, "sensitivity", "input:sensitivity"), -1.f, 1.f); libinput_device_config_accel_set_speed(LIBINPUTDEV, LIBINPUTSENS); + if (libinput_device_config_rotation_is_available(LIBINPUTDEV)) { + const auto ROTATION = std::clamp(g_pConfigManager->getDeviceInt(devname, "rotation", "input:rotation"), 0, 359); + libinput_device_config_rotation_set_angle(LIBINPUTDEV, ROTATION); + } + m->m_flipX = g_pConfigManager->getDeviceInt(devname, "flip_x", "input:touchpad:flip_x") != 0; m->m_flipY = g_pConfigManager->getDeviceInt(devname, "flip_y", "input:touchpad:flip_y") != 0; -- cgit v1.2.3