Merge pull request #8466 from jordan-woyak/evdev-float
evdev: fix bad integer division.
This commit is contained in:
commit
499f065b83
|
@ -75,11 +75,11 @@ public:
|
||||||
int value = 0;
|
int value = 0;
|
||||||
libevdev_fetch_event_value(m_dev, EV_ABS, m_code, &value);
|
libevdev_fetch_event_value(m_dev, EV_ABS, m_code, &value);
|
||||||
|
|
||||||
return ControlState(value - m_base) / m_range;
|
return (value - m_base) / m_range;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_range;
|
ControlState m_range;
|
||||||
int m_base;
|
int m_base;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue