input: add missing has_vibration() method to InputDevice

This commit is contained in:
rdb 2018-01-03 14:48:18 +01:00
parent 962e6e31e4
commit 58623b09bd
2 changed files with 11 additions and 0 deletions

View File

@ -118,6 +118,16 @@ has_tracker() const {
return ((_flags & IDF_has_tracker) != 0); return ((_flags & IDF_has_tracker) != 0);
} }
/**
* Returns true if the device has vibration motors that can be controlled by
* calling set_vibration().
*/
INLINE bool InputDevice::
has_vibration() const {
LightMutexHolder holder(_lock);
return ((_flags & IDF_has_vibration) != 0);
}
/** /**
* Returns true if the device may be able to provide information about its * Returns true if the device may be able to provide information about its
* battery life. * battery life.

View File

@ -149,6 +149,7 @@ PUBLISHED:
INLINE bool has_pointer() const; INLINE bool has_pointer() const;
INLINE bool has_keyboard() const; INLINE bool has_keyboard() const;
INLINE bool has_tracker() const; INLINE bool has_tracker() const;
INLINE bool has_vibration() const;
INLINE bool has_battery() const; INLINE bool has_battery() const;
INLINE PointerData get_pointer() const; INLINE PointerData get_pointer() const;