diff options
Diffstat (limited to 'src/hwstate.c')
| -rw-r--r-- | src/hwstate.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/hwstate.c b/src/hwstate.c index d758d25..07bab31 100644 --- a/src/hwstate.c +++ b/src/hwstate.c | |||
| @@ -69,14 +69,24 @@ static void set_finger(struct FingerState *fs, | |||
| 69 | { | 69 | { |
| 70 | int x = defuzz(hw->position_x, fs->hw.position_x, caps->xfuzz); | 70 | int x = defuzz(hw->position_x, fs->hw.position_x, caps->xfuzz); |
| 71 | int y = defuzz(hw->position_y, fs->hw.position_y, caps->yfuzz); | 71 | int y = defuzz(hw->position_y, fs->hw.position_y, caps->yfuzz); |
| 72 | fs->hw = *hw; | 72 | int tj = defuzz(hw->touch_major, fs->hw.touch_major, caps->wfuzz); |
| 73 | int tn = defuzz(hw->touch_minor, fs->hw.touch_minor, caps->wfuzz); | ||
| 74 | int wj = defuzz(hw->width_major, fs->hw.width_major, caps->wfuzz); | ||
| 75 | int wn = defuzz(hw->width_minor, fs->hw.width_minor, caps->wfuzz); | ||
| 73 | fs->id = id; | 76 | fs->id = id; |
| 77 | fs->hw = *hw; | ||
| 78 | fs->hw.position_x = x; | ||
| 79 | fs->hw.position_y = y; | ||
| 80 | if (hw->touch_major) { | ||
| 81 | fs->hw.touch_major = tj; | ||
| 82 | fs->hw.touch_minor = tn; | ||
| 83 | } | ||
| 84 | fs->hw.width_major = wj; | ||
| 85 | fs->hw.width_minor = wn; | ||
| 74 | if (!caps->has_touch_minor) | 86 | if (!caps->has_touch_minor) |
| 75 | fs->hw.touch_minor = hw->touch_major; | 87 | fs->hw.touch_minor = hw->touch_major; |
| 76 | if (!caps->has_width_minor) | 88 | if (!caps->has_width_minor) |
| 77 | fs->hw.width_minor = hw->width_major; | 89 | fs->hw.width_minor = hw->width_major; |
| 78 | fs->hw.position_x = x; | ||
| 79 | fs->hw.position_y = y; | ||
| 80 | } | 90 | } |
| 81 | 91 | ||
| 82 | void modify_hwstate(struct HWState *s, | 92 | void modify_hwstate(struct HWState *s, |
