qol: Stop changing user default controls to the new one

This commit is contained in:
tomikun
2026-07-20 09:47:38 +08:00
parent e8a088c4df
commit 59fc7cdb1f
2 changed files with 5 additions and 3 deletions

View File

@@ -9,9 +9,11 @@ import static net.kdt.pojavlaunch.PojavApplication.sExecutorService;
import android.content.Context;
import android.content.res.AssetManager;
import android.util.Log;
import android.widget.Toast;
import com.kdt.mcgui.ProgressLayout;
import net.kdt.pojavlaunch.R;
import net.kdt.pojavlaunch.Tools;
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
@@ -74,9 +76,8 @@ public class AsyncAssetManager {
String assetSha1 = new String(org.apache.commons.codec.binary.Hex.encodeHex(org.apache.commons.codec.digest.DigestUtils.sha1(is)));
if (!Tools.compareSHA1(new File(Tools.CTRLDEF_FILE), assetSha1)) {
Tools.copyAssetFile(ctx, "default.json", Tools.CTRLMAP_PATH, "new_default.json" , false);
// Be annoying and set their default to the new one heehee
LauncherPreferences.DEFAULT_PREF.edit().putString("defaultCtrl", Tools.CTRLMAP_PATH+"/new_default.json").apply();
} else Tools.copyAssetFile(ctx, "default.json", Tools.CTRLMAP_PATH, false);
} else if (!new File(Tools.CTRLMAP_PATH+"/new_default.json").exists())
Tools.copyAssetFile(ctx, "default.json", Tools.CTRLMAP_PATH, false);
}
Tools.copyAssetFile(ctx, "launcher_profiles.json", Tools.DIR_GAME_NEW, false);

View File

@@ -512,5 +512,6 @@
<string name="select_lwjgl3ify_version">Select LWJGL3ify version</string>
<string name="lwjgl3ify_installer_available_versions">Supported LWJGL3IFY versions</string>
<string name="lwjgl3ify_installer_broken_versions">Broken LWJGL3ify versions (SDL)</string>
<string name="new_default_controls">Extracted new default controls into new_default.json. Try it out!</string>
</resources>