diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-09 15:57:33 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-09 15:59:36 +0100 |
commit | 68dcaac0fa2fdbfc81d666ddbf6beea6bf7fd24c (patch) | |
tree | 2e78c8625600781493428aca1264525e9af3fa43 /yavta.c | |
parent | 11dce4f6eebd325e3d237aa9ad7d0ffa8559448f (diff) |
Mark current menu value with a (*) when querying controls
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'yavta.c')
-rw-r--r-- | yavta.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -634,7 +634,8 @@ static int video_enable(struct device *dev, int enable) return 0; } -static void video_query_menu(struct device *dev, struct v4l2_queryctrl *query) +static void video_query_menu(struct device *dev, struct v4l2_queryctrl *query, + unsigned int value) { struct v4l2_querymenu menu; int ret; @@ -647,9 +648,11 @@ static void video_query_menu(struct device *dev, struct v4l2_queryctrl *query) continue; if (query->type == V4L2_CTRL_TYPE_MENU) - printf(" %u: %.32s\n", menu.index, menu.name); + printf(" %u: %.32s%s\n", menu.index, menu.name, + menu.index == value ? " (*)" : ""); else - printf(" %u: %lld\n", menu.index, menu.value); + printf(" %u: %lld%s\n", menu.index, menu.value, + menu.index == value ? " (*)" : ""); }; } @@ -695,7 +698,7 @@ static void video_list_controls(struct device *dev) if (query.type == V4L2_CTRL_TYPE_MENU || query.type == V4L2_CTRL_TYPE_INTEGER_MENU) - video_query_menu(dev, &query); + video_query_menu(dev, &query, val64); nctrls++; } |