diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceExperimentalFragment.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceExperimentalFragment.java
index cec4106b7..6418be4e3 100644
--- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceExperimentalFragment.java
+++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/screens/LauncherPreferenceExperimentalFragment.java
@@ -41,11 +41,6 @@ public void onCreatePreferences(Bundle b, String str) {
addPreferencesFromResource(R.xml.pref_experimental);
computeVisibility();
- findPreference("SetGLVersion").setOnPreferenceClickListener((preference) -> {
- showSetGLVersionDialog();
- return true;
- });
-
final Preference downloadMesa = requirePreference("DownloadMesa", Preference.class);
downloadMesa.setOnPreferenceClickListener((a)-> {
loadMesaList();
@@ -98,12 +93,11 @@ public void onCreatePreferences(Bundle b, String str) {
return true;
});
- SwitchPreference setGLVersion = requirePreference("SetGLVersion", SwitchPreference.class);
+ SwitchPreference setGLVersion = requirePreference("ebCustom", SwitchPreference.class);
setGLVersion.setOnPreferenceChangeListener((p, v) -> {
boolean set = (boolean) v;
if (!set) return false;
closeOtherCustomMesaPref(customMesaVersionPref);
- LauncherPreferences.DEFAULT_PREF.edit().putBoolean("ebCustom", true).apply();
return true;
});
setGLVersion.setOnPreferenceClickListener(preference -> {
@@ -235,7 +229,12 @@ private void showSetGLVersionDialog() {
.putString("mesaGLSLVersion", LauncherPreferences.PREF_MESA_GLSL_VERSION)
.apply();
})
- .setNegativeButton(R.string.alertdialog_cancel, null)
+ .setNegativeButton(R.string.alertdialog_cancel, (dia, i) -> {
+ LauncherPreferences.DEFAULT_PREF.edit()
+ .putBoolean("ebCustom", false)
+ .putBoolean("ebSystem", true)
+ .apply();
+ })
.create();
dialog.show();
}
diff --git a/app_pojavlauncher/src/main/res/xml/pref_experimental.xml b/app_pojavlauncher/src/main/res/xml/pref_experimental.xml
index aba2ef7d2..8790d4997 100644
--- a/app_pojavlauncher/src/main/res/xml/pref_experimental.xml
+++ b/app_pojavlauncher/src/main/res/xml/pref_experimental.xml
@@ -87,13 +87,14 @@