|
@@ -107,14 +107,14 @@ void la_ScanWacomDevices(Display *display, int deviceid){
|
|
|
info = XIQueryDevice(display, deviceid, &ndevices);
|
|
|
for(i = 0; i < ndevices; i++) {
|
|
|
dev = &info[i];
|
|
|
- printf("%s\n",dev->name);
|
|
|
+ int is_ipts=0; if(strstr(dev->name, "ipts")){ is_ipts=1; }
|
|
|
word = strtok (dev->name," ");
|
|
|
while (1) {
|
|
|
word = strtok (NULL, " "); if (!word) break;
|
|
|
if (strcmp("stylus", word) == 0) MAIN.WacomDeviceStylus = dev->deviceid; // wacom
|
|
|
elif (strcmp("eraser", word) == 0) MAIN.WacomDeviceEraser = dev->deviceid; // wacom
|
|
|
- elif (strcmp("Pen", word) == 0) MAIN.WacomDeviceStylus = dev->deviceid; // surface ipts
|
|
|
- elif (strcmp("Eraser", word) == 0) MAIN.WacomDeviceEraser = dev->deviceid; // surface ipts
|
|
|
+ elif (is_ipts && strcmp("Pen", word) == 0) MAIN.WacomDeviceStylus = dev->deviceid; // surface ipts
|
|
|
+ elif (is_ipts && strcmp("Eraser", word) == 0) MAIN.WacomDeviceEraser = dev->deviceid; // surface ipts
|
|
|
}
|
|
|
}
|
|
|
if(MAIN.WacomDeviceStylus || MAIN.WacomDeviceEraser){
|