mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -04:00
New eXperimental hack -> Texture size shrink
This commit is contained in:
parent
f3c16027a6
commit
6cdfe1a694
@ -34,6 +34,7 @@ public class LauncherPreferences
|
||||
public static int PREF_CONTROL_BOTTOM_OFFSET = 0;
|
||||
public static int PREF_CONTROL_LEFT_OFFSET = 0;
|
||||
public static boolean PREF_SUSTAINED_PERFORMANCE = false;
|
||||
public static String PREF_GLES_SHRINK_HACK = "0";
|
||||
|
||||
|
||||
public static void loadPreferences(Context ctx) {
|
||||
@ -63,6 +64,7 @@ public class LauncherPreferences
|
||||
PREF_CONTROL_BOTTOM_OFFSET = DEFAULT_PREF.getInt("controlBottomOffset", 0);
|
||||
PREF_CONTROL_LEFT_OFFSET = DEFAULT_PREF.getInt("controlLeftOffset", 0);
|
||||
PREF_SUSTAINED_PERFORMANCE = DEFAULT_PREF.getBoolean("sustainedPerformance", false);
|
||||
PREF_GLES_SHRINK_HACK = DEFAULT_PREF.getString("gl4es_shrink_hack", "0");
|
||||
|
||||
/*
|
||||
if (PREF_CUSTOM_JAVA_ARGS.isEmpty()) {
|
||||
|
@ -4,6 +4,7 @@ import static net.kdt.pojavlaunch.Architecture.ARCH_X86;
|
||||
import static net.kdt.pojavlaunch.Architecture.archAsString;
|
||||
import static net.kdt.pojavlaunch.Architecture.is64BitsDevice;
|
||||
import static net.kdt.pojavlaunch.Tools.LOCAL_RENDERER;
|
||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_GLES_SHRINK_HACK;
|
||||
|
||||
import android.app.*;
|
||||
import android.content.*;
|
||||
@ -207,6 +208,9 @@ public class JREUtils {
|
||||
envMap.put("HOME", Tools.DIR_GAME_NEW);
|
||||
envMap.put("TMPDIR", activity.getCacheDir().getAbsolutePath());
|
||||
envMap.put("LIBGL_MIPMAP", "3");
|
||||
|
||||
// The shrink hack can be enabled from the experimental settings
|
||||
envMap.put("LIBGL_SHRINK", PREF_GLES_SHRINK_HACK);
|
||||
|
||||
// Fix white color on banner and sheep, since GL4ES 1.1.5
|
||||
envMap.put("LIBGL_NORMALIZE", "1");
|
||||
|
@ -17,4 +17,15 @@
|
||||
<item>opengles3_vgpu</item> <!-- vgpu with OpenGL ES 3 -->
|
||||
<item>opengles3_virgl</item> <!-- virglrenderer with OpenGL ES 3 -->
|
||||
</string-array>
|
||||
|
||||
<string-array name="hack_gles_shrink">
|
||||
<item name="0">@string/gles_hack_none</item>
|
||||
<item name="1">@string/gles_hack_always</item>
|
||||
<item name="4">@string/gles_hack_sometimes</item>
|
||||
</string-array>
|
||||
<string-array name="hack_gles_shrink_values">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>4</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
@ -279,5 +279,8 @@
|
||||
<string name="preference_sustained_performance_description">Limit thermal throttling by limiting peak performance</string>
|
||||
|
||||
<string name="preference_back_title">Back to the last screen</string>
|
||||
<string name="gles_hack_none">Don\'t shrink textures</string>
|
||||
<string name="gles_hack_always">Divides all textures by 2</string>
|
||||
<string name="gles_hack_sometimes">Divides big textures by /2 or /4</string>
|
||||
|
||||
</resources>
|
||||
|
@ -1,7 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app2="http://schemas.android.com/apk/res-auto">
|
||||
<net.kdt.pojavlaunch.prefs.BackButtonPreference/>
|
||||
<PreferenceCategory android:title="Experimental fuckury">
|
||||
|
||||
<androidx.preference.ListPreference
|
||||
android:title="GL4ES Shrink hack"
|
||||
android:key="gl4es_shrink_hack"
|
||||
android:defaultValue="0"
|
||||
android:entryValues="@array/hack_gles_shrink_values"
|
||||
android:entries="@array/hack_gles_shrink"
|
||||
app2:useSimpleSummaryProvider="true"/>
|
||||
|
||||
</PreferenceCategory>
|
||||
</PreferenceScreen>
|
Loading…
x
Reference in New Issue
Block a user