1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

Fix $memgraph and $cpugraph in a way that doesn't break other things

This commit is contained in:
Pavel Labath 2009-12-01 23:45:31 +01:00
parent 24ebff6a62
commit 018ca8e0ef
2 changed files with 3 additions and 3 deletions

View File

@ -515,7 +515,7 @@ uint8_t mem_barval(struct text_object *obj)
{
(void)obj;
return round_to_int(info.memmax ? (info.mem * 100 / info.memmax) : 0);
return round_to_int(info.memmax ? (info.mem * 255 / info.memmax) : 0);
}
uint8_t swap_percentage(struct text_object *obj)

View File

@ -419,7 +419,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
END OBJ(cpugraph, &update_cpu_usage)
char *buf = 0;
SCAN_CPU(arg, obj->data.i);
buf = scan_graph(obj, arg, 100);
buf = scan_graph(obj, arg, 255);
DBGP2("Adding $cpugraph for CPU %d", obj->data.i);
if (buf) free(buf);
obj->callbacks.graphval = &cpu_barval;
@ -820,7 +820,7 @@ struct text_object *construct_text_object(const char *s, const char *arg, long
#ifdef X11
END OBJ(memgraph, &update_meminfo)
char *buf = 0;
buf = scan_graph(obj, arg, 100);
buf = scan_graph(obj, arg, 255);
if (buf) free(buf);
obj->callbacks.graphval = &mem_barval;