mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 15:14:38 +01:00
ratbagd-profile: cap minimum report rate to 125
Fixes the sanity check part of #1563.
This commit is contained in:
@@ -594,8 +594,11 @@ ratbagd_profile_set_report_rate(sd_bus *bus,
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
/* basic sanity check */
|
/* basic sanity check */
|
||||||
if (rate > 8000)
|
if (rate < 125) {
|
||||||
|
rate = 125;
|
||||||
|
} else if (rate > 8000) {
|
||||||
rate = 8000;
|
rate = 8000;
|
||||||
|
}
|
||||||
|
|
||||||
r = ratbag_profile_set_report_rate(profile->lib_profile, rate);
|
r = ratbag_profile_set_report_rate(profile->lib_profile, rate);
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user