Commit 0e794109 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Add methods telling if the CPU is x86 and if we have a fast CPU.

parent bcc7c4a0
......@@ -77,10 +77,20 @@ public class Version {
} catch (Throwable e) {}
return false;
}
public static boolean isX86() {
try {
return sdkAboveOrEqual(4)
&& Build.class.getField("CPU_ABI").get(null).toString().startsWith("x86");
} catch (Throwable e) {}
return false;
}
public static boolean hasNeon(){
if (hasNeon == null) hasNeon = nativeHasNeon();
return hasNeon;
}
public static boolean hasFastCpu() {
return isArmv7() || isX86();
}
public static boolean isVideoCapable() {
return !Version.sdkStrictlyBelow(5) && isArmv7() && Hacks.hasCamera();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment