From 496f9d678a61f8802bcc7bcb5b88adef90a6bef6 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 30 Nov 2014 01:17:05 -0600 Subject: [PATCH] [Android] Removes CPU architecture number from CPU helper. This was '7' on all ARMv7 devices but was 'AArch64' on the Nexus 9. Trying to cast to integer was causing a crash. We don't even use this so may as well as wipe it. Also adds Nvidia to the CPU implementers list. --- .../dolphinemu/utils/CPUHelper.java | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Source/Android/src/org/dolphinemu/dolphinemu/utils/CPUHelper.java b/Source/Android/src/org/dolphinemu/dolphinemu/utils/CPUHelper.java index 43e6b66da4..30be6e2213 100644 --- a/Source/Android/src/org/dolphinemu/dolphinemu/utils/CPUHelper.java +++ b/Source/Android/src/org/dolphinemu/dolphinemu/utils/CPUHelper.java @@ -18,7 +18,6 @@ import android.util.Log; public final class CPUHelper { private int revision; - private int architecture; private int variant; private int numCores; private String implementerID = "N/A"; @@ -80,15 +79,6 @@ public final class CPUHelper return revision; } - /** - * Gets the architecture number of the CPU. - * - * @return the architecture number of the CPU. - */ - public int getArchitecture() - { - return architecture; - } /** * Gets the CPU variant number. @@ -170,6 +160,13 @@ public final class CPUHelper return Build.CPU_ABI.contains("arm"); } + /** + * Whether or not this CPU is using the ARM64 architecture. + * + * @return true if this CPU uses the ARM64 architecture; false otherwise. + */ + public static boolean isARM64() { return Build.CPU_ABI.contains("arm64"); } + /** * Whether or not this CPU is using the x86 architecture. * @@ -217,11 +214,6 @@ public final class CPUHelper { this.implementerID = parseArmID(Integer.decode(parseLine(line))); } - // Intentional lack of "\t:" sometimes the tab isn't present. - else if (line.contains("CPU architecture")) - { - this.architecture = Integer.decode(parseLine(line)); - } else if (line.contains("CPU part\t:")) { this.part = parseArmPartNumber(Integer.decode(parseLine(line))); @@ -271,6 +263,9 @@ public final class CPUHelper case 0x4D: return "Freescale Semiconductor Inc."; + case 0x4E: + return "Nvidia Corporation"; + case 0x51: return "Qualcomm Inc.";