Merge pull request #779 from DroidsOnRoids/opengles

Add OpenGL ES version to device properties.
This commit is contained in:
Simo Kinnunen
2018-03-23 22:43:21 +09:00
committed by GitHub
6 changed files with 25 additions and 0 deletions

View File

@@ -108,6 +108,17 @@ devutil.makeIdentity = function(serial, properties) {
var abi = properties['ro.product.cpu.abi']
var product = properties['ro.product.name']
var cpuPlatform = properties['ro.board.platform']
var openGLESVersion = properties['ro.opengles.version']
openGLESVersion = parseInt(openGLESVersion, 10)
if (isNaN(openGLESVersion)) {
openGLESVersion = '0.0'
}
else {
var openGLESVersionMajor = (openGLESVersion & 0xffff0000) >> 16
var openGLESVersionMinor = (openGLESVersion & 0xffff)
openGLESVersion = openGLESVersionMajor + '.' + openGLESVersionMinor
}
// Remove brand prefix for consistency. Note that some devices (e.g. TPS650)
// do not expose the brand property.
@@ -133,5 +144,6 @@ devutil.makeIdentity = function(serial, properties) {
, sdk: sdk
, product: product
, cpuPlatform: cpuPlatform
, openGLESVersion: openGLESVersion
}
}