Merge pull request #8466 from jordan-woyak/evdev-float

evdev: fix bad integer division.
This commit is contained in:
Pierre Bourdon 2019-11-10 18:53:22 +01:00 committed by GitHub
commit 499f065b83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -75,11 +75,11 @@ public:
int value = 0;
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:
int m_range;
ControlState m_range;
int m_base;
};