mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 04:40:25 +01:00
touchpad: compress a statement
Having this initialized and then changed later is more confusing that having the trinary here in one line
This commit is contained in:
parent
920debffd7
commit
6020ce7c9f
1 changed files with 2 additions and 4 deletions
|
|
@ -2944,13 +2944,11 @@ tp_init_pressure(struct tp_dispatch *tp,
|
|||
struct evdev_device *device)
|
||||
{
|
||||
const struct input_absinfo *abs;
|
||||
unsigned int code = ABS_PRESSURE;
|
||||
unsigned int code;
|
||||
const char *prop;
|
||||
int hi, lo;
|
||||
|
||||
if (tp->has_mt)
|
||||
code = ABS_MT_PRESSURE;
|
||||
|
||||
code = tp->has_mt ? ABS_MT_PRESSURE : ABS_PRESSURE;
|
||||
if (!libevdev_has_event_code(device->evdev, EV_ABS, code)) {
|
||||
tp->pressure.use_pressure = false;
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue