1
0
forked from drath/libratbag

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 <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2015-08-28 12:20:46 +10:00
parent d620683e38
commit 36f92cf91e

View File

@@ -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);