tools: profiles are 0-index based

It felt weird reading:
  Profile 2
    Resolutions:
      3: 1000dpi @ 500Hz (active)
      3: 1600dpi @ 500Hz
      3: 2400dpi @ 500Hz
      3: 3200dpi @ 500Hz
      3: 4000dpi @ 500Hz
      3: 8000dpi @ 500Hz

We could index the profiles to 1 too, but that would introduce slightly
more code change.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
Benjamin Tissoires
2015-08-27 14:31:58 -04:00
parent 2f69a70acc
commit 07a0b0961b

View File

@@ -330,7 +330,7 @@ ratbag_cmd_info(struct ratbag *ratbag, uint32_t flags, int argc, char **argv)
res = ratbag_profile_get_resolution(profile, j);
dpi = ratbag_resolution_get_dpi(res);
rate = ratbag_resolution_get_report_rate(res);
printf(" %d: %ddpi @ %dHz%s\n", i+1, dpi, rate,
printf(" %d: %ddpi @ %dHz%s\n", i, dpi, rate,
ratbag_resolution_is_active(res) ? " (active)" : "");
ratbag_resolution_unref(res);