forked from drath/libratbag
ratbag: add dirty flag for report rate
Signed-off-by: Filipe Laíns <lains@archlinux.org>
This commit is contained in:
committed by
Filipe Laíns
parent
8a476a8724
commit
e9d67b7235
@@ -295,6 +295,7 @@ struct ratbag_profile {
|
||||
unsigned int hz; /**< report rate in Hz */
|
||||
unsigned int rates[8]; /**< report rates available */
|
||||
size_t nrates; /**< number of entries in rates */
|
||||
bool rate_dirty;
|
||||
|
||||
unsigned int num_resolutions;
|
||||
|
||||
|
||||
@@ -949,6 +949,8 @@ ratbag_device_commit(struct ratbag_device *device)
|
||||
list_for_each(profile, &device->profiles, link) {
|
||||
profile->dirty = false;
|
||||
|
||||
profile->rate_dirty = false;
|
||||
|
||||
list_for_each(button, &profile->buttons, link)
|
||||
button->dirty = false;
|
||||
|
||||
@@ -1117,6 +1119,7 @@ ratbag_profile_set_report_rate(struct ratbag_profile *profile,
|
||||
if (profile->hz != hz) {
|
||||
profile->hz = hz;
|
||||
profile->dirty = true;
|
||||
profile->rate_dirty = true;
|
||||
}
|
||||
|
||||
return RATBAG_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user