summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-18 16:00:52 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-18 16:00:52 -0500
commit45426ff16cf5c43680ecf2305d55b8900e51de8a (patch)
tree1da1d3b764f622f37e19dffd268b39b754c52b41 /tdecore/tdehardwaredevices.cpp
parentac20eb80ee91ddc618e0491d200aa60ea074f417 (diff)
downloadtdelibs-45426ff16cf5c43680ecf2305d55b8900e51de8a.tar.gz
tdelibs-45426ff16cf5c43680ecf2305d55b8900e51de8a.zip
Fix detection of PS/2 and AC97 devices
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehardwaredevices.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index c4cae020d..f44272b31 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -3007,7 +3007,8 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::OtherVirtual);
}
if ((devicetypestring == "audio")
- || (devicesubsystem == "sound")) {
+ || (devicesubsystem == "sound")
+ || (devicesubsystem == "ac97")) {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Sound);
}
if ((devicesubsystem == "video4linux")
@@ -3066,7 +3067,15 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
}
}
if (devicesubsystem == "serio") {
- if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Serial);
+ if (devicedriver.contains("atkbd")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Keyboard);
+ }
+ else if (devicedriver.contains("mouse")) {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Mouse);
+ }
+ else {
+ if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Serial);
+ }
}
if (devicesubsystem == "ppdev") {
if (!device) device = new TDEGenericDevice(TDEGenericDeviceType::Parallel);
@@ -5168,4 +5177,4 @@ TDEGenericHardwareList TDEHardwareDevices::listAllPhysicalDevices() {
return ret;
}
-#include "tdehardwaredevices.moc" \ No newline at end of file
+#include "tdehardwaredevices.moc"