iPhone检测处理器型号/NEON支持 [英] iPhone detecting processor model / NEON support
问题描述
我正在寻找一种在运行时区分配备新 ARM 处理器的设备(例如 iPhone 3GS 和某些 iPod 3G)和配备旧 ARM 处理器的设备的方法.我知道我可以使用 uname() 来确定设备型号,但由于只有部分 iPod touch 3G 的 ARM 处理器得到了提升,这还不够.
I'm looking for a way to differentiate at runtime between devices equipped with the new ARM processor (such as iPhone 3GS and some iPods 3G) and devices equipped with the old ARM processors. I know I can use uname() to determine the device model, but as only some of the iPod touches 3G received a boost in their ARM processor, this isn't enough.
因此,我正在寻找其中之一:
Therefore, I'm looking for one of these:
- 一种检测处理器模型的方法 - 我想没有.
- 一种确定是否支持 ARM neon 指令的方法 - 我可以从中得出答案.
- 一种确定设备总存储大小的方法 - 将其与已知的设备模型相结合,可能会巧妙地引导我找到答案.
- <输入随机想法>
提前致谢:)
推荐答案
我能想到的一种解决方法是检测 OpenGL ES 2.0 是否可用,因为较新的处理器支持.
One workaround I can think of, is detecting if OpenGL ES 2.0 is available, since the newer processors enable that.
mobileorchard 上有一篇文章 关于如何去做.
There's an article at mobileorchard on how to do it.
这篇关于iPhone检测处理器型号/NEON支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!