[PATCH weston] weston-info: do not round refresh rates

Quentin Glidic sardemff7+wayland at sardemff7.net
Tue Apr 12 08:23:54 UTC 2016


On 12/04/2016 10:13, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Weston-info was accidentally rounding refresh rates to integer Hz.
>
> Fix it to print 3 decimals, as the protocol carries exactly that.
>
> Reported-by: Michel Dänzer <michel at daenzer.net>
> Cc: John Galt <johngaltfirstrun at gmail.com>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
>  clients/weston-info.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/clients/weston-info.c b/clients/weston-info.c
> index 8ba80c0..aa81816 100644
> --- a/clients/weston-info.c
> +++ b/clients/weston-info.c
> @@ -226,7 +226,7 @@ print_output_info(void *data)
>  	wl_list_for_each(mode, &output->modes, link) {
>  		printf("\tmode:\n");
>
> -		printf("\t\twidth: %d px, height: %d px, refresh: %.f Hz,\n",
> +		printf("\t\twidth: %d px, height: %d px, refresh: %.3f Hz,\n",
>  		       mode->width, mode->height,
>  		       (float) mode->refresh / 1000);
>
>

Trivial enough, LGTM.
Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>

-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list