From 8a99ed64363a3f6e33472d5b36be9da5dd44762a Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 15 Sep 2015 10:34:42 -0400 Subject: [PATCH] roccat: write the profile to commit the button asap we should not require to actually write the profile to actually write the button in the memory of the device. Signed-off-by: Benjamin Tissoires --- src/driver-roccat.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/driver-roccat.c b/src/driver-roccat.c index b9931c7c..b8f90ff8 100644 --- a/src/driver-roccat.c +++ b/src/driver-roccat.c @@ -814,11 +814,21 @@ roccat_write_button(struct ratbag_button *button, *data = rc; + rc = roccat_write_profile(button->profile); + if (rc) { + log_error(device->ratbag, + "unable to write the profile to the device: '%s' (%d)\n", + strerror(-rc), rc); + return rc; + } + rc = roccat_write_macro(button, action); - if (rc) + if (rc) { log_error(device->ratbag, "unable to write the macro to the device: '%s' (%d)\n", strerror(-rc), rc); + return rc; + } return rc; }