steelseries: only write report rate if it's dirty

This commit is contained in:
Yaroslav Chvanov
2022-02-06 03:12:34 +03:00
committed by Peter Hutterer
parent c12edcd4c7
commit 217847adde

View File

@@ -996,9 +996,11 @@ steelseries_write_profile(struct ratbag_profile *profile)
int rc;
bool buttons_dirty = false;
rc = steelseries_write_report_rate(profile);
if (rc != 0)
return rc;
if (profile->rate_dirty) {
rc = steelseries_write_report_rate(profile);
if (rc != 0)
return rc;
}
ratbag_profile_for_each_resolution(profile, resolution) {
if (!resolution->dirty)