X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Fgraph.c;h=be5d8b4a00676c480bc95fa857d595856a624b38;hb=506b744ddb3c04e5796c22f3967e6dbd7974ee37;hp=f26e9cf1f2ba4da3aa05c07fb0d13ab792f56f76;hpb=a16822176e2bdb982c2330a33749f76aea9f1a8b;p=psensor.git diff --git a/src/graph.c b/src/graph.c index f26e9cf..be5d8b4 100644 --- a/src/graph.c +++ b/src/graph.c @@ -33,6 +33,8 @@ /* vertical padding */ #define GRAPH_V_PADDING 4 +bool is_smooth_curves_enabled; + static time_t get_graph_end_time_s() { struct timeval tv; @@ -351,10 +353,10 @@ graph_update(struct psensor **sensors, { struct color *fgcolor = config->graph_fgcolor; int et, bt, width, height, g_width, g_height; - double min_rpm, max_rpm, mint, maxt; + double min_rpm, max_rpm, mint, maxt, min, max; char *strmin, *strmax; /* horizontal and vertical offset of the graph */ - int g_xoff, g_yoff, no_graphs, min, max; + int g_xoff, g_yoff, no_graphs; cairo_surface_t *cst; cairo_t *cr, *cr_pixmap; char *str_btime, *str_etime; @@ -482,7 +484,7 @@ graph_update(struct psensor **sensors, max = maxt; } - if (1) + if (is_smooth_curves_enabled) draw_sensor_smooth_curve(s, cr, min, max, bt, et,