diff options
author | Burt P <pburt0@gmail.com> | 2019-12-22 22:37:49 -0600 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-12-22 20:45:24 -0800 |
commit | 069152c13136345fa3b38b1a224c78060f03117b (patch) | |
tree | 7f8f9d81bbafea4ab6390d504afce79d6e206a74 /deps/sysobj_early | |
parent | 8d2d49c901e6cb000869124c438f84a4ef10e68e (diff) |
nice_name: option to remove "with Radeon" from AMD CPU names
'AMD E2-1800 APU with Radeon(tm) HD Graphics' ---> 'AMD E2-1800'
'AMD FX-9800P RADEON R7, 12 COMPUTE CORES 4C+8G' ---> 'AMD FX-9800P'
'AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx' ---> 'AMD Ryzen 5 3500U'
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'deps/sysobj_early')
-rw-r--r-- | deps/sysobj_early/src/nice_name.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/sysobj_early/src/nice_name.c b/deps/sysobj_early/src/nice_name.c index 7d3cee88..e5e15a46 100644 --- a/deps/sysobj_early/src/nice_name.c +++ b/deps/sysobj_early/src/nice_name.c @@ -67,6 +67,7 @@ void nice_name_x86_cpuid_model_string(char *cpuid_model_string) { static gboolean remove_amd_xn_ncore_redundancy = TRUE; static gboolean remove_processor_cpu_apu_etc = TRUE; static gboolean remove_mhz_ghz = TRUE; + static gboolean remove_radeon = TRUE; if (!cpuid_model_string) return; g_strstrip(cpuid_model_string); @@ -101,6 +102,13 @@ void nice_name_x86_cpuid_model_string(char *cpuid_model_string) { if (g_str_has_prefix(cpuid_model_string, "AMD")) { while(str_shorten(cpuid_model_string, "Mobile Technology", "Mobile")) {}; + if (remove_radeon) { + char *radeon = strcasestr(cpuid_model_string, "with Radeon"); + if (!radeon) + radeon = strcasestr(cpuid_model_string, "Radeon"); + if (radeon) *radeon = 0; + } + if (remove_amd_compute_cores) { if (strcasestr(cpuid_model_string, " COMPUTE CORES ")) { /* ex: AMD FX-9800P RADEON R7, 12 COMPUTE CORES 4C+8G */ |