Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenXR improvements #321

Open
wants to merge 3 commits into
base: openxr
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,11 @@ public String getOriginName(long l) {
ByteBuffer byteBuffer = stack.calloc(size);
error = XR10.xrGetInputSourceLocalizedName(session, info, buf, byteBuffer);
logError(error, "xrGetInputSourceLocalizedName", "get String");
return new String(byteBuffer.array());
try {
return new String(byteBuffer.array());
} catch (UnsupportedOperationException e) {
return "ERROR";
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ public class XRBindings {

public static HashSet<String> supportedHeadsets() {
HashSet<String> set = new HashSet<>();
if (MCOpenXR.get().systemName.toLowerCase().contains("oculus") || MCOpenXR.get().systemName.toLowerCase().contains("meta")) {
set.add("/interaction_profiles/oculus/touch_controller");
return set;
}
set.add("/interaction_profiles/oculus/touch_controller");
if (MCOpenXR.get().session.getCapabilities().XR_HTC_vive_cosmos_controller_interaction) {
set.add("/interaction_profiles/htc/vive_cosmos_controller");
}
Expand All @@ -29,26 +26,26 @@ private static HashSet<Pair<String, String>> quest2Bindings() {

set.add(new MutablePair<>("/actions/gui/in/vivecraft.key.guiShift", "/user/hand/left/input/squeeze"));
set.add(new MutablePair<>("/actions/gui/in/vivecraft.key.guiMiddleClick", "/user/hand/right/input/squeeze"));
set.add(new MutablePair<>("/actions/gui/in/vivecraft.key.guiLeftClick", "/user/hand/right/input/trigger"));
set.add(new MutablePair<>("/actions/gui/in/vivecraft.key.guiLeftClick", "/user/hand/right/input/trigger/value"));
set.add(new MutablePair<>("/actions/gui/in/vivecraft.key.guiRightClick", "/user/hand/right/input/a/click"));
set.add(new MutablePair<>("/actions/gui/in/vivecraft.key.guiScrollAxis", "/user/hand/right/input/thumbstick/y"));

set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.hotbarPrev", "/user/hand/left/input/squeeze"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.hotbarNext", "/user/hand/right/input/squeeze"));
set.add(new MutablePair<>("/actions/ingame/in/key.attack", "/user/hand/right/input/trigger"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.teleport", "/user/hand/left/input/trigger"));
set.add(new MutablePair<>("/actions/ingame/in/key.attack", "/user/hand/right/input/trigger/value"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.teleport", "/user/hand/left/input/trigger/value"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.radialMenu", "/user/hand/right/input/b/click"));
set.add(new MutablePair<>("/actions/ingame/in/key.use", "/user/hand/right/input/a/click"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.teleportFallback", "/user/hand/left/input/trigger/value"));
set.add(new MutablePair<>("/actions/ingame/in/key.jump", "/user/hand/left/input/thumbstick"));
set.add(new MutablePair<>("/actions/ingame/in/key.jump", "/user/hand/left/input/thumbstick/click"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.freeMoveStrafe", "/user/hand/left/input/thumbstick"));
set.add(new MutablePair<>("/actions/ingame/in/key.sneak", "/user/hand/right/input/thumbstick"));
set.add(new MutablePair<>("/actions/ingame/in/key.sneak", "/user/hand/right/input/thumbstick/click"));
set.add(new MutablePair<>("/actions/ingame/in/vivecraft.key.rotateAxis", "/user/hand/right/input/thumbstick"));

set.add(new MutablePair<>("/actions/keyboard/in/vivecraft.key.keyboardShift", "/user/hand/left/input/squeeze"));
set.add(new MutablePair<>("/actions/keyboard/in/vivecraft.key.keyboardShift", "/user/hand/right/input/squeeze"));
set.add(new MutablePair<>("/actions/keyboard/in/vivecraft.key.keyboardClick", "/user/hand/left/input/trigger"));
set.add(new MutablePair<>("/actions/keyboard/in/vivecraft.key.keyboardClick", "/user/hand/right/input/trigger"));
set.add(new MutablePair<>("/actions/keyboard/in/vivecraft.key.keyboardClick", "/user/hand/left/input/trigger/value"));
set.add(new MutablePair<>("/actions/keyboard/in/vivecraft.key.keyboardClick", "/user/hand/right/input/trigger/value"));
return set;
}

Expand Down
Empty file modified gradlew
100644 → 100755
Empty file.