Skip to content

Commit

Permalink
libinput: make set_calibration_matrix verbose
Browse files Browse the repository at this point in the history
This is for debugging purposes only. Do not merge this
  • Loading branch information
RedSoxFan committed Aug 2, 2019
1 parent 8ee054b commit 3eb60c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sway/input/libinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,16 @@ static bool set_dwt(struct libinput_device *device, bool dwt) {

static bool set_calibration_matrix(struct libinput_device *dev, float mat[6]) {
if (!libinput_device_config_calibration_has_matrix(dev)) {
sway_log(SWAY_DEBUG, "set_calibration_matrix: not supported");
return false;
}
bool changed = false;
float current[6];
libinput_device_config_calibration_get_matrix(dev, current);
for (int i = 0; i < 6; i++) {
sway_log(SWAY_DEBUG,
"set_calibration_matrix: current[%d]=%f mat[%d]=%f",
i, current[i], i, mat[i]);
if (current[i] != mat[i]) {
changed = true;
break;
Expand Down

0 comments on commit 3eb60c6

Please sign in to comment.