mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-07-30 10:16:51 -04:00
fix: Remove janky SDL switch
We no longer need it, The SDL_Init hook works well enough.
This commit is contained in:
@@ -619,15 +619,15 @@ public final class Tools {
|
||||
String TAG = "OldLegacy4JMitigation";
|
||||
Log.i(TAG, "Legacy4J detected!");
|
||||
oldL4JMitigationLogListener = loggedLine -> {
|
||||
if (LauncherPreferences.PREF_GAMEPAD_SDL_PASSTHRU && loggedLine.contains("literal{SDL3 (isXander's libsdl4j)} isn't supported in this system. GLFW will be used instead.")) {
|
||||
Log.i(TAG, "Old version of Legacy4J detected! Force enabling SDL");
|
||||
if (loggedLine.contains("literal{SDL3 (isXander's libsdl4j)} isn't supported in this system. GLFW will be used instead.")) {
|
||||
Logger.appendToLog("Amethyst-Android: Broken version of Legacy4J (below 1.8.51.8.5.2537.1) detected! Force enabling SDL");
|
||||
Tools.SDL.initializeControllerSubsystems();
|
||||
Tools.runOnUiThread(() -> {
|
||||
Tools.dialog(activity, activity.getString(R.string.global_warning), activity.getString(R.string.oldL4JFound));
|
||||
});
|
||||
Logger.removeLogListener(oldL4JMitigationLogListener);
|
||||
} else if (LauncherPreferences.PREF_GAMEPAD_SDL_PASSTHRU && loggedLine.contains("Added SDL Controller Mappings")) {
|
||||
Log.i(TAG, "Fixed version of Legacy4J detected! Have fun!");
|
||||
} else if (loggedLine.contains("Added SDL Controller Mappings")) {
|
||||
Logger.appendToLog("Amethyst-Android: Fixed version of Legacy4J (1.8.5.2537.1 or higher) detected! Have fun!");
|
||||
Logger.removeLogListener(oldL4JMitigationLogListener);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -39,8 +39,6 @@ public class LauncherPreferences {
|
||||
public static final String PREF_VERSION_REPOS = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json";
|
||||
public static boolean PREF_CHECK_LIBRARY_SHA = true;
|
||||
public static boolean PREF_DISABLE_GESTURES = false;
|
||||
public static boolean PREF_GAMEPAD_SDL_PASSTHRU = false;
|
||||
public static boolean PREF_GAMEPAD_FORCEDSDL_PASSTHRU = false;
|
||||
public static boolean PREF_DISABLE_SWAP_HAND = false;
|
||||
public static float PREF_MOUSESPEED = 1f;
|
||||
public static int PREF_RAM_ALLOCATION;
|
||||
@@ -91,8 +89,6 @@ public class LauncherPreferences {
|
||||
PREF_FORCE_ENGLISH = DEFAULT_PREF.getBoolean("force_english", false);
|
||||
PREF_CHECK_LIBRARY_SHA = DEFAULT_PREF.getBoolean("checkLibraries",true);
|
||||
PREF_DISABLE_GESTURES = DEFAULT_PREF.getBoolean("disableGestures",false);
|
||||
PREF_GAMEPAD_SDL_PASSTHRU = DEFAULT_PREF.getBoolean("gamepadPassthru",false);
|
||||
PREF_GAMEPAD_FORCEDSDL_PASSTHRU = DEFAULT_PREF.getBoolean("gamepadPassthruForced",false);
|
||||
PREF_DISABLE_SWAP_HAND = DEFAULT_PREF.getBoolean("disableDoubleTap", false);
|
||||
PREF_RAM_ALLOCATION = DEFAULT_PREF.getInt("allocation", findBestRAMAllocation(ctx));
|
||||
PREF_CUSTOM_JAVA_ARGS = DEFAULT_PREF.getString("javaArgs", "");
|
||||
|
||||
@@ -173,22 +173,6 @@
|
||||
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/preference_category_SDL_settings">
|
||||
<androidx.preference.SwitchPreferenceCompat
|
||||
android:defaultValue="true"
|
||||
android:icon="@drawable/ic_menu_custom_controls"
|
||||
android:key="gamepadPassthru"
|
||||
android:summary="@string/mcl_gamepad_SDL_subtitle"
|
||||
android:title="@string/mcl_gamepad_SDL"/>
|
||||
|
||||
<androidx.preference.SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="gamepadPassthruForced"
|
||||
android:summary="@string/mcl_gamepad_forcedSDL_subtitle"
|
||||
android:title="@string/mcl_gamepad_forcedSDL"/>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory
|
||||
android:title="@string/preference_category_touchcontroller_settings">
|
||||
<SwitchPreference
|
||||
|
||||
Reference in New Issue
Block a user