From 7b5dc58140c95a5a3e2b32dd8490ffbd27ace81d Mon Sep 17 00:00:00 2001 From: Techflash <72118300+techflashYT@users.noreply.github.com> Date: Tue, 25 Mar 2025 01:05:23 -0700 Subject: [PATCH] CPU (Linux): fix CPU detection on some PPC platforms (#1640) On some PowerPC devices (notably the Nintendo Wii and Nintendo Wii U), fastfetch detects the CPU incorrectly. It goes down the code path of 'detectSocName()', and actually matches the model of the device itself... as the CPU model name. This is obviously incorrect, and leads to reporting such as 'CPU: wii'. Disable this code path alltogether on PPC to prevent this, and just let it pull from cpuinfo. This lets it have correct CPU reporting, such as on the Wii, giving 'CPU: 750CL @ 0.73GHz'. --- src/detection/cpu/cpu_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/cpu/cpu_linux.c b/src/detection/cpu/cpu_linux.c index a62141817..735e7f782 100644 --- a/src/detection/cpu/cpu_linux.c +++ b/src/detection/cpu/cpu_linux.c @@ -608,7 +608,7 @@ FF_MAYBE_UNUSED static const char* detectCPUOthers(const FFCPUOptions* options, #if __ANDROID__ detectAndroid(cpu); - #else + #elif !__powerpc__ && !__powerpc detectSocName(cpu); #endif