menu: show physical CPU cores in System Information

The "CPU Cores" row printed cpu_features_get_core_amount(), which is
the logical processor count, so a 16-core/32-thread 9950X3D read as
"CPU Cores: 32".

It now prints the physical count from
cpu_features_get_core_amount_physical(), and adds the thread count
when SMT makes it larger: "CPU Cores: 16 (32 threads)". Parts without
SMT keep the plain "CPU Cores: 4" form.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-09-26 20:58:12 +02:00
1 parent f5919416a9
commit 02ec762c0c
5 files changed
+19 -4

No files matched your search

Binary file not shown.
+4
View File
@@ -1539,6 +1539,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_CPU_CORES,
"CPU Cores"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_CPU_THREADS,
"threads"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_JIT_AVAILABLE,
"JIT Available"
+13 -4
View File
@@ -2948,12 +2948,21 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list)
/* CPU Cores */
{
unsigned cores = cpu_features_get_core_amount();
size_t _len = strlcpy(entry,
/* Physical cores, with the thread count alongside where SMT
* doubles it - the raw thread count read as 32 cores on a
* 16-core part. */
unsigned threads = cpu_features_get_core_amount();
unsigned cores = cpu_features_get_core_amount_physical();
size_t _len = strlcpy(entry,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CPU_CORES),
sizeof(entry));
snprintf(entry + _len, sizeof(entry) - _len,
": %u", cores);
if (threads > cores)
snprintf(entry + _len, sizeof(entry) - _len,
": %u (%u %s)", cores, threads,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CPU_THREADS));
else
snprintf(entry + _len, sizeof(entry) - _len,
": %u", cores);
if (menu_entries_append(list, entry, "",
MENU_ENUM_LABEL_CPU_CORES, MENU_SETTINGS_CORE_INFO_NONE,
0, 0, NULL))
+1
View File
@@ -2120,6 +2120,7 @@ enum msg_hash_enums
/* System information */
MENU_LABEL(CPU_CORES),
MENU_LABEL(CPU_THREADS),
MENU_LABEL(CPU_ARCHITECTURE),
MENU_LABEL(JIT_AVAILABLE),
MENU_LABEL(BUNDLE_IDENTIFIER),
+1
View File
@@ -149,6 +149,7 @@
#define MENU_ENUM_LABEL_CORE_STEAM_UNINSTALL_STR "core_steam_uninstall"
#define MENU_ENUM_LABEL_CPU_ARCHITECTURE_STR "system_information_cpu_architecture"
#define MENU_ENUM_LABEL_CPU_CORES_STR "system_information_cpu_cores"
#define MENU_ENUM_LABEL_CPU_THREADS_STR "system_information_cpu_threads"
#define MENU_ENUM_LABEL_CUSTOM_BIND_STR "custom_bind"
#define MENU_ENUM_LABEL_CUSTOM_BIND_ALL_STR "custom_bind_all"
#define MENU_ENUM_LABEL_DATABASE_MANAGER_STR "database_manager"