Mouse add-one: Fix touchpads detection.
The "touchpad" string is part of the path, not of the device name. Regression introduced in hrev53835.
This commit is contained in:
@@ -323,7 +323,10 @@ MouseDevice::_BuildShortName() const
|
|||||||
else
|
else
|
||||||
name.Capitalize();
|
name.Capitalize();
|
||||||
|
|
||||||
if (deviceName.FindFirst("touchpad") >= 0) {
|
// Check the whole string for "touchpad" because it's a different directory
|
||||||
|
// FIXME use MS_IS_TOUCHPAD ioctl instead (or fIsTouchpad which caches its
|
||||||
|
// result) but this can only be done after the control thread is running
|
||||||
|
if (string.FindFirst("touchpad") >= 0) {
|
||||||
name << " Touchpad ";
|
name << " Touchpad ";
|
||||||
} else if (deviceName.FindFirst("trackpoint") >= 0) {
|
} else if (deviceName.FindFirst("trackpoint") >= 0) {
|
||||||
// That's always PS/2, so don't keep the bus name
|
// That's always PS/2, so don't keep the bus name
|
||||||
|
|||||||
Reference in New Issue
Block a user