Merge pull request #6185 from scottpleb/evdev-axis-range
evdev: Correctly calculate axis range for min values greater than 0.
This commit is contained in:
commit
e5d1e2a914
|
@ -313,7 +313,7 @@ evdevDevice::Axis::Axis(u8 index, u16 code, bool upper, libevdev* dev)
|
|||
: m_code(code), m_index(index), m_upper(upper), m_dev(dev)
|
||||
{
|
||||
m_min = libevdev_get_abs_minimum(m_dev, m_code);
|
||||
m_range = libevdev_get_abs_maximum(m_dev, m_code) + abs(m_min);
|
||||
m_range = libevdev_get_abs_maximum(m_dev, m_code) - m_min;
|
||||
}
|
||||
|
||||
std::string evdevDevice::Axis::GetName() const
|
||||
|
|
Loading…
Reference in New Issue