Skip to content

Commit

Permalink
Merge pull request amwatson#17 from gyroninja/ignore-link-fail
Browse files Browse the repository at this point in the history
Ignore failures to load openxr_forwardloader.oculus for v62+
  • Loading branch information
amwatson authored Jan 23, 2024
2 parents e1398b6 + 1412662 commit 4758326
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion externals/openxr-sdk-src
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.content.ContextWrapper;
import android.content.Intent;
import android.hardware.display.DisplayManager;
import android.os.Build;
import android.os.Bundle;
import android.view.Display;
import android.view.InputDevice;
Expand All @@ -26,6 +27,17 @@ public class VrActivity extends EmulationActivity {
public static VrActivity currentActivity = null;
ClickRunnable clickRunnable = new ClickRunnable();

static {
if (Build.BRAND.equals("oculus")) {
try {
System.loadLibrary("openxr_forwardloader.oculus");
} catch (UnsatisfiedLinkError e) {
// This was needed before v62
// In v62 this library is deleted
}
}
}

public final ActivityResultLauncher<SoftwareKeyboard.KeyboardConfig> mVrKeyboardLauncher =
registerForActivityResult(new VrKeyboardActivity.Contract(),
result -> VrKeyboardActivity.onFinishResult(result));
Expand Down

0 comments on commit 4758326

Please sign in to comment.