Android renderer : fixed issue where parsing opengl es version was failing on some device and causing a crash

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10711 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
rem..om 2013-07-13 19:35:51 +00:00
parent aa325fc854
commit b143904913

View File

@ -128,7 +128,7 @@ public class OGLESShaderRenderer implements Renderer {
public EnumSet<Caps> getCaps() {
return caps;
}
private int extractVersion(String prefixStr, String versionStr) {
if (versionStr != null) {
int spaceIdx = versionStr.indexOf(" ", prefixStr.length());
@ -137,6 +137,8 @@ public class OGLESShaderRenderer implements Renderer {
} else {
versionStr = versionStr.substring(prefixStr.length()).trim();
}
//some device have ":" at the end of the version.
versionStr = versionStr.replaceAll("\\:", "");
float version = Float.parseFloat(versionStr);
return (int) (version * 100);
} else {