Fix config overwrite issue

This commit is contained in:
Simon 2022-12-17 19:44:14 +00:00
parent 48f75ba6a3
commit 14fe1a87d4
2 changed files with 6 additions and 6 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.jkquest"
android:versionCode="32"
android:versionName="0.5.1" android:installLocation="auto" >
android:versionCode="33"
android:versionName="0.5.2" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030002" android:required="true"/>

View file

@ -212,10 +212,10 @@ import java.util.Vector;
String model = android.os.Build.MODEL;
if (model.contains("Quest")) {
//Meta Quest
copy_asset_device_specific("/sdcard/JKQuest/JK2/base", "openjo_sp_quest.cfg", "openjo_sp.cfg", false);
copy_asset_with_rename("/sdcard/JKQuest/JK2/base", "openjo_sp_quest.cfg", "openjo_sp.cfg", false);
} else {
//Pico XR
copy_asset_device_specific("/sdcard/JKQuest/JK2/base", "openjo_sp_pico.cfg", "openjo_sp.cfg", false);
copy_asset_with_rename("/sdcard/JKQuest/JK2/base", "openjo_sp_pico.cfg", "openjo_sp.cfg", false);
}
//Bunch of cool mods and their credits - only copy if user wants them
@ -274,8 +274,8 @@ import java.util.Vector;
mNativeHandle = GLES3JNILib.onCreate( this, commandLineParams );
}
public void copy_asset_device_specific(String path, String name, String name_out, boolean force) {
File f = new File(path + "/" + name);
public void copy_asset_with_rename(String path, String name, String name_out, boolean force) {
File f = new File(path + "/" + name_out);
if (!f.exists() || force) {
//Ensure we have an appropriate folder