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
3.0
rem..om 12 years ago
parent aa325fc854
commit b143904913
  1. 2
      engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java

@ -137,6 +137,8 @@ public class OGLESShaderRenderer implements Renderer {
} else { } else {
versionStr = versionStr.substring(prefixStr.length()).trim(); versionStr = versionStr.substring(prefixStr.length()).trim();
} }
//some device have ":" at the end of the version.
versionStr = versionStr.replaceAll("\\:", "");
float version = Float.parseFloat(versionStr); float version = Float.parseFloat(versionStr);
return (int) (version * 100); return (int) (version * 100);
} else { } else {

Loading…
Cancel
Save