forked from drath/libratbag
hidpp10: if we can't fetch the current profile, error out
Right now we initialize any hidpp10 device with one profile and then go and fetch the data. But we never check for return codes, so it always succeeds even when we can't get anything out of the device at all. Eventually we fail the sanity checks with "invalid dpi list" which is confusing at best. Let's avoid this by requiring at least the current profile to work. This will break devices that have a single emulated profile, i.e. those that don't have profiles but rely on libratbag to emulate one based on the current-resolution/current-... calls. Not sure we actually support any of those, so let's see. Closes #738 though it doesn't fix it, it just bails out better. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Benjamin Tissoires
parent
906f17add2
commit
33ced3dfb7
@@ -2751,8 +2751,7 @@ hidpp10_get_device_info(struct hidpp10_device *dev)
|
||||
|
||||
hidpp10_get_optical_sensor_settings(dev, &reflect);
|
||||
|
||||
hidpp10_get_current_profile(dev, ¤t_profile);
|
||||
return 0;
|
||||
return hidpp10_get_current_profile(dev, ¤t_profile);
|
||||
}
|
||||
|
||||
struct hidpp10_device*
|
||||
|
||||
Reference in New Issue
Block a user