From f91be6442ddb9097b9bd95fddee79f99d421e127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 25 Jul 2024 10:48:42 +0800 Subject: [PATCH] Android (Linux): detect MTK CPU part name --- src/detection/cpu/cpu_linux.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/detection/cpu/cpu_linux.c b/src/detection/cpu/cpu_linux.c index 5e5b58efa..851c881db 100644 --- a/src/detection/cpu/cpu_linux.c +++ b/src/detection/cpu/cpu_linux.c @@ -56,8 +56,10 @@ static void detectAndroid(FFCPUResult* cpu) { if (cpu->name.length == 0) { - ffSettingsGetAndroidProperty("ro.soc.model", &cpu->name); - ffStrbufClear(&cpu->vendor); // We usually detect the vendor of CPU core as ARM, but instead we want the vendor of SOC + if (ffSettingsGetAndroidProperty("ro.soc.model", &cpu->name)) + ffStrbufClear(&cpu->vendor); // We usually detect the vendor of CPU core as ARM, but instead we want the vendor of SOC + else if(ffSettingsGetAndroidProperty("ro.mediatek.platform", &cpu->name)) + ffStrbufSetStatic(&cpu->vendor, "MTK"); } if (cpu->vendor.length == 0) {