mirror of
https://github.com/Dr-Noob/cpufetch.git
synced 2026-03-24 23:40:39 +01:00
[v1.05][X86] Do not show empty SSE if not supported (#260)
This commit is contained in:
@@ -634,9 +634,10 @@ bool print_cpufetch_x86(struct cpuInfo* cpu, STYLE s, struct color** cs, struct
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show the most modern vector instructions.
|
// Show the most modern vector instructions.
|
||||||
// If AVX is supported show it, otherwise show SSE
|
|
||||||
if (strcmp(avx, "No") == 0) {
|
if (strcmp(avx, "No") == 0) {
|
||||||
setAttribute(art, ATTRIBUTE_SSE, sse);
|
if (strcmp(sse, "No") != 0) {
|
||||||
|
setAttribute(art, ATTRIBUTE_SSE, sse);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setAttribute(art, ATTRIBUTE_AVX, avx);
|
setAttribute(art, ATTRIBUTE_AVX, avx);
|
||||||
|
|||||||
@@ -1096,8 +1096,14 @@ char* get_str_sse(struct cpuInfo* cpu) {
|
|||||||
last+=SSE4_2_sl;
|
last+=SSE4_2_sl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Purge last comma
|
if (last == 0) {
|
||||||
string[last-1] = '\0';
|
snprintf(string, 2+1, "No");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//Purge last comma
|
||||||
|
string[last-1] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user