e_input: Do not devide translation components by output's w/h of a matrix
[platform/upstream/enlightenment.git] / src / bin / e_input_evdev.c
index 0cbe09c..1386b92 100644 (file)
@@ -89,12 +89,14 @@ _device_calibration_set(E_Input_Evdev *edev)
    if ((!vals) ||
        (sscanf(vals, "%f %f %f %f %f %f",
                &cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6))
-     return;
+     {
+        udev_device_unref(udev_device);
+        return;
+     }
+   udev_device_unref(udev_device);
 
    ELOGF("E_INPUT_EVDEV", "calibration_set cal[%lf %lf %lf %lf %lf %lf] (%d x %d)",
          NULL, cal[0], cal[1], cal[2], cal[3], cal[4], cal[5], w, h);
-   cal[2] /= w;
-   cal[5] /= h;
 
    status =
      libinput_device_config_calibration_set_matrix(edev->device, cal);
@@ -2491,7 +2493,11 @@ e_input_evdev_axis_size_set(E_Input_Evdev *edev, int w, int h)
    if ((!vals) ||
        (sscanf(vals, "%f %f %f %f %f %f",
                &cal[0], &cal[1], &cal[2], &cal[3], &cal[4], &cal[5]) != 6))
-     return;
+     {
+        udev_device_unref(udev_device);
+        return;
+     }
+   udev_device_unref(udev_device);
 
    ELOGF("E_INPUT_EVDEV", "axis_size_set cal[%lf %lf %lf %lf %lf %lf] (%d x %d)",
          NULL, cal[0], cal[1], cal[2], cal[3], cal[4], cal[5], w, h);