Skip to content

Commit

Permalink
Check for "stylus" instead of using hardcoded ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZaneA committed Jan 12, 2013
1 parent 089ffd2 commit 062b2ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XInput.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static XDeviceInfo* xinput_findDeviceById(Display *display, int id)
devices = XListInputDevices(display, &num);

for (int i = 0; i < num; i++) {
if (id == devices[i].id) {
if (strstr(devices[i].name, "stylus") != NULL) {
// Fill tablet model here.
snprintf(g_xinput_values.tabletModel, sizeof(g_xinput_values.tabletModel), devices[i].name);
snprintf(g_xinput_values.tabletModelID, sizeof(g_xinput_values.tabletModelID), devices[i].name);
Expand Down

0 comments on commit 062b2ee

Please sign in to comment.