mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
CPU: update JSON format structure
This commit is contained in:
+10
-5
@@ -152,11 +152,16 @@ void ffGenerateCPUJson(FFCPUOptions* options, yyjson_mut_doc* doc, yyjson_mut_va
|
||||
yyjson_mut_val* obj = yyjson_mut_obj_add_obj(doc, module, "result");
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "cpu", &cpu.name);
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "vendor", &cpu.vendor);
|
||||
yyjson_mut_obj_add_uint(doc, obj, "coresPhysical", cpu.coresPhysical);
|
||||
yyjson_mut_obj_add_uint(doc, obj, "coresLogical", cpu.coresLogical);
|
||||
yyjson_mut_obj_add_uint(doc, obj, "coresOnline", cpu.coresOnline);
|
||||
yyjson_mut_obj_add_real(doc, obj, "frequencyMin", cpu.frequencyMin);
|
||||
yyjson_mut_obj_add_real(doc, obj, "frequencyMax", cpu.frequencyMax);
|
||||
|
||||
yyjson_mut_val* cores = yyjson_mut_obj_add_obj(doc, obj, "cores");
|
||||
yyjson_mut_obj_add_uint(doc, cores, "physical", cpu.coresPhysical);
|
||||
yyjson_mut_obj_add_uint(doc, cores, "logical", cpu.coresLogical);
|
||||
yyjson_mut_obj_add_uint(doc, cores, "online", cpu.coresOnline);
|
||||
|
||||
yyjson_mut_val* frequency = yyjson_mut_obj_add_obj(doc, obj, "frequency");
|
||||
yyjson_mut_obj_add_real(doc, frequency, "min", cpu.frequencyMin);
|
||||
yyjson_mut_obj_add_real(doc, frequency, "max", cpu.frequencyMax);
|
||||
|
||||
yyjson_mut_obj_add_real(doc, obj, "temperature", cpu.temperature);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user