From 36f92cf91e8dab6165954ffc5884705dfb61be77 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 28 Aug 2015 12:20:46 +1000 Subject: [PATCH] Always init at least one resolution mode The one mode may be disabled and not configurable, but it's still more predictable to have one that none. Signed-off-by: Peter Hutterer --- src/libratbag.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libratbag.c b/src/libratbag.c index 470ed094..ea54625b 100644 --- a/src/libratbag.c +++ b/src/libratbag.c @@ -569,6 +569,7 @@ ratbag_create_profile(struct ratbag_device *device, for (i = 0; i < MAX_RESOLUTIONS; i++) ratbag_resolution_init(profile, i, 0, 0); + profile->resolution.num_modes = 1; assert(device->driver->read_profile); device->driver->read_profile(profile, index);