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

Pekka Paalanen ppaalanen at gmail.com
Tue Apr 12 08:13:32 UTC 2016


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



More information about the wayland-devel mailing list