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:
Leo Lam 2017-11-11 12:01:29 +01:00 committed by GitHub
commit e5d1e2a914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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