mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Add a helper function to init a resolution mode
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -139,9 +139,8 @@ hidpp10drv_read_profile(struct ratbag_profile *profile, unsigned int index)
|
||||
profile->resolution.num_modes = p.num_dpi_modes;
|
||||
for (i = 0; i < p.num_dpi_modes; i++) {
|
||||
/* FIXME: we should expose x/y res separately */
|
||||
profile->resolution.modes[i].dpi = p.dpi_modes[i].xres;
|
||||
profile->resolution.modes[i].hz = p.refresh_rate;
|
||||
profile->resolution.modes[i].is_active = false;
|
||||
ratbag_resolution_init(profile, i, p.dpi_modes[i].xres,
|
||||
p.refresh_rate);
|
||||
if (profile->is_active && profile->resolution.modes[i].dpi == xres)
|
||||
profile->resolution.modes[i].is_active = true;
|
||||
if (i == p.default_dpi_mode)
|
||||
|
||||
Reference in New Issue
Block a user