mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
G300: fix writing multiple profiles
Writing multiple changed profiles was broken as we would exit the loop after the first profile write. We were returning the number of bytes written and this was interpreted as an error. Fix it my returning 0 when we have written the correct number of bytes to the mouse.
This commit is contained in:
committed by
Peter Hutterer
parent
3b1a41f154
commit
6d105a002c
@@ -480,7 +480,13 @@ logitech_g300_write_profile(struct ratbag_profile *profile)
|
||||
HID_FEATURE_REPORT,
|
||||
HID_REQ_SET_REPORT);
|
||||
|
||||
return rc;
|
||||
if (rc < (signed)sizeof(*report)) {
|
||||
log_error(device->ratbag,
|
||||
"Error while writing profile: %d\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user