Skip to content

Commit

Permalink
Default to 40h if device is unrecognized.
Browse files Browse the repository at this point in the history
  • Loading branch information
William Light committed Jan 16, 2010
1 parent 2d7aa65 commit 9692aca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/platform/linux_libudev.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ static int get_monome_information(monome_t *monome, struct udev_device *d) {
break;
}

if( !model )
return 1; /* unrecognized device, disregard */
if( !model ) {
/* unrecognized device, go with lowest common denominator */
monome->model = MONOME_DEVICE_40h;
return 1;
}

monome->model = model;
monome->serial = strdup(serial);
Expand Down
7 changes: 5 additions & 2 deletions src/platform/linux_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,11 @@ static int get_monome_information_from_devname(monome_t *monome, const char *pat
break;
}
if( !model )
return 1; /* unrecognized device, disregard */
if( !model ) {
/* unrecognized device, go with lowest common denominator */
monome->model = MONOME_DEVICE_40h;
return 1;
}

monome->model = model;
monome->serial = buf;
Expand Down

0 comments on commit 9692aca

Please sign in to comment.