mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-10 06:42:17 +00:00
Manufacturer based openxr_loader selection (rather than model)
This commit is contained in:
parent
cfbb5fc943
commit
dc17afde16
2 changed files with 9 additions and 5 deletions
|
@ -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="37"
|
||||
android:versionName="0.6.0" android:installLocation="auto" >
|
||||
android:versionCode="38"
|
||||
android:versionName="0.6.1" android:installLocation="auto" >
|
||||
|
||||
<!-- Tell the system this app requires OpenGL ES 3.1. -->
|
||||
<uses-feature android:glEsVersion="0x00030002" android:required="true"/>
|
||||
|
|
|
@ -10,6 +10,7 @@ import android.app.Activity;
|
|||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.AssetManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.RemoteException;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
|
@ -31,6 +32,7 @@ import java.io.FileReader;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Locale;
|
||||
import java.util.Vector;
|
||||
|
||||
@SuppressLint("SdCardPath") public class GLES3JNIActivity extends Activity implements SurfaceHolder.Callback
|
||||
|
@ -65,14 +67,16 @@ import java.util.Vector;
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
String model = android.os.Build.MODEL;
|
||||
if (model.contains("Quest"))
|
||||
String manufacturer = Build.MANUFACTURER.toLowerCase(Locale.ROOT);
|
||||
if (manufacturer.contains("oculus") ||
|
||||
manufacturer.contains("meta"))
|
||||
{
|
||||
System.loadLibrary("openxr_loader_meta");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.loadLibrary("openxr_loader_pico");
|
||||
//Load manufacturer specific loader
|
||||
System.loadLibrary("openxr_loader_" + manufacturer);
|
||||
}
|
||||
|
||||
System.loadLibrary( "openjk_" + game );
|
||||
|
|
Loading…
Reference in a new issue