From f6efadd778210a79a90338655741eb1468059648 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 13 Oct 2019 20:53:49 -0400 Subject: [PATCH] v0.7.5b: fixed new font failing to work on devices with Mali gpus --- .../android/AndroidPlatformSupport.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java index 29254b601..fb8555286 100644 --- a/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java +++ b/android/src/main/java/com/shatteredpixel/shatteredpixeldungeon/android/AndroidPlatformSupport.java @@ -276,8 +276,13 @@ public class AndroidPlatformSupport extends PlatformSupport { if (SCFontGenerator != null) fonts.put(SCFontGenerator, SCFonts); if (JPFontGenerator != null) fonts.put(JPFontGenerator, JPFonts); - //use RGBA4444 to save memory. Extra precision isn't needed here. - packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA4444, 1, false); + String renderer = Gdx.gl.glGetString(Gdx.gl.GL_RENDERER); + //want to use RGBA4444 to save memory if we can, but this causes problems on Mali gpus + if (renderer.contains("Mali") || renderer.contains("mali")) { + packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA8888, 1, false); + } else { + packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA4444, 1, false); + } } @Override