From 97cec18d2755b287d1f65cae88138b19cc5fff4e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Jun 2016 11:33:49 +1000 Subject: [PATCH] tools: reduce tilt scale to 1/30 of the input value The x/y tilt angle comes in as degrees, so our scale could be as large as 90x the original size. Scale to something more sensible. Signed-off-by: Peter Hutterer --- tools/event-gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/event-gui.c b/tools/event-gui.c index 605f00a3..b67ca452 100644 --- a/tools/event-gui.c +++ b/tools/event-gui.c @@ -272,7 +272,7 @@ draw_tablet(struct window *w, cairo_t *cr) cairo_set_source_rgb(cr, .8, .8, .2); cairo_translate(cr, w->tool.x, w->tool.y); - cairo_scale(cr, 1.0 + w->tool.tilt_x, 1.0 + w->tool.tilt_y); + cairo_scale(cr, 1.0 + w->tool.tilt_x/30.0, 1.0 + w->tool.tilt_y/30.0); cairo_arc(cr, 0, 0, 1 + 10 * max(w->tool.pressure, w->tool.distance), 0, 2 * M_PI);