From b143904913d28434bb0172a3be91e66c71222687 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Sat, 13 Jul 2013 19:35:51 +0000 Subject: [PATCH] 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 --- .../com/jme3/renderer/android/OGLESShaderRenderer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java index ed1c7dd98..ef67ceff8 100644 --- a/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java +++ b/engine/src/android/com/jme3/renderer/android/OGLESShaderRenderer.java @@ -128,7 +128,7 @@ public class OGLESShaderRenderer implements Renderer { public EnumSet 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 {