From 0fe3b69f7dcbdf0e342ea91336137140dde35efe Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Tue, 29 May 2012 14:50:18 +0000 Subject: [PATCH] - ANDROID Reverted a change in resolution setting, as it apparently has bad side effects on GUI - Android texture util ENABLE_COMPRESSION is now public to be able to change it. Accessing it through the appSettings would be better. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9436 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/android/com/jme3/app/AndroidHarness.java | 13 +++++++------ .../com/jme3/renderer/android/TextureUtil.java | 3 ++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/engine/src/android/com/jme3/app/AndroidHarness.java b/engine/src/android/com/jme3/app/AndroidHarness.java index d7c2bfdf4..ac3a3e749 100644 --- a/engine/src/android/com/jme3/app/AndroidHarness.java +++ b/engine/src/android/com/jme3/app/AndroidHarness.java @@ -134,8 +134,8 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt protected OGLESContext ctx; protected GLSurfaceView view = null; protected boolean isGLThreadPaused = true; - private ImageView splashImageView = null; - private FrameLayout frameLayout = null; + protected ImageView splashImageView = null; + protected FrameLayout frameLayout = null; final private String ESCAPE_EVENT = "TouchEscape"; private boolean firstDrawFrame = true; @@ -175,10 +175,11 @@ public class AndroidHarness extends Activity implements TouchListener, DialogInt view = ctx.createView(eglConfigType, eglConfigVerboseLogging); // Set the screen reolution -// WindowManager wind = this.getWindowManager(); -// Display disp = wind.getDefaultDisplay(); -// logger.log(Level.WARNING, "Resolution from Window: {0}, {1}", new Object[]{disp.getWidth(), disp.getHeight()}); -// ctx.getSettings().setResolution(disp.getWidth(), disp.getHeight()); + //TODO try to find a better way to get a hand on the resolution + WindowManager wind = this.getWindowManager(); + Display disp = wind.getDefaultDisplay(); + logger.log(Level.WARNING, "Resolution from Window: {0}, {1}", new Object[]{disp.getWidth(), disp.getHeight()}); + ctx.getSettings().setResolution(disp.getWidth(), disp.getHeight()); // AndroidHarness wraps the app as a SystemListener. ctx.setSystemListener(this); diff --git a/engine/src/android/com/jme3/renderer/android/TextureUtil.java b/engine/src/android/com/jme3/renderer/android/TextureUtil.java index 855b9a1d8..b94ab35b6 100644 --- a/engine/src/android/com/jme3/renderer/android/TextureUtil.java +++ b/engine/src/android/com/jme3/renderer/android/TextureUtil.java @@ -19,7 +19,8 @@ public class TextureUtil { private static final Logger logger = Logger.getLogger(TextureUtil.class.getName()); - private static boolean ENABLE_COMPRESSION = true; + //TODO Make this configurable through appSettings + public static boolean ENABLE_COMPRESSION = true; private static boolean NPOT = false; private static boolean ETC1support = false; private static boolean DXT1 = false;