@covas-labs/electron-vr 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bridge.d.ts CHANGED
@@ -30,6 +30,10 @@ export interface RuntimeInfo {
30
30
  openxrProtocolVersion: number;
31
31
  openxrSubmittedFrameSequence: number;
32
32
  openxrConsumedFrameSequence: number;
33
+ libovrHostDetected: boolean;
34
+ libovrHostProcessId: number;
35
+ libovrHostApplicationName: string;
36
+ libovrHostBinaryPath: string;
33
37
  openvrAvailable: boolean;
34
38
  openvrRuntimeInstalled: boolean;
35
39
  openvrRuntimePath: string;
package/dist/bridge.js CHANGED
@@ -139,6 +139,10 @@ function sanitizeRuntimeInfo(runtimeInfo) {
139
139
  openxrProtocolVersion: runtimeInfo.openxrProtocolVersion ?? 0,
140
140
  openxrSubmittedFrameSequence: runtimeInfo.openxrSubmittedFrameSequence ?? 0,
141
141
  openxrConsumedFrameSequence: runtimeInfo.openxrConsumedFrameSequence ?? 0,
142
+ libovrHostDetected: runtimeInfo.libovrHostDetected ?? false,
143
+ libovrHostProcessId: runtimeInfo.libovrHostProcessId ?? 0,
144
+ libovrHostApplicationName: runtimeInfo.libovrHostApplicationName ?? "",
145
+ libovrHostBinaryPath: runtimeInfo.libovrHostBinaryPath ?? "",
142
146
  openvrSceneApplicationState: runtimeInfo.openvrSceneApplicationState ?? "",
143
147
  openvrSceneProcessId: runtimeInfo.openvrSceneProcessId ?? 0,
144
148
  openvrSceneApplicationKey: runtimeInfo.openvrSceneApplicationKey ?? "",
@@ -45,7 +45,19 @@ export function analyzeVRCompatibility(runtime, context = {}) {
45
45
  let compatibleHostGraphicsApis = [];
46
46
  let requiresApiLayer = false;
47
47
  let recommendedAction = "none";
48
- if (runtime.selectedBackend === "openxr" && runtime.openxrMode === "overlay-session") {
48
+ const supportedHostDetected = runtime.openxrCompanionConnected || runtime.openxrHostDetected ||
49
+ runtime.openvrSceneProcessId !== 0;
50
+ const unsupportedLibOVRHost = runtime.libovrHostDetected && !supportedHostDetected &&
51
+ runtime.openxrMode !== "overlay-session";
52
+ if (unsupportedLibOVRHost) {
53
+ const applicationName = runtime.libovrHostApplicationName || "A VR application";
54
+ readiness = "unavailable";
55
+ backendLabel = "Unsupported native Oculus application";
56
+ summary = `${applicationName} is using native Oculus/LibOVR, which electron-vr cannot overlay.`;
57
+ recommendedAction = "use-supported-openxr-host";
58
+ issues.push(issue("libovr-host-unsupported", "error", "Native Oculus application detected", "Relaunch the application through OpenXR or a supported OpenVR runtime. Native LibOVR applications do not expose a cross-application overlay API.", "use-supported-openxr-host"));
59
+ }
60
+ else if (runtime.selectedBackend === "openxr" && runtime.openxrMode === "overlay-session") {
49
61
  readiness = "ready";
50
62
  backendLabel = "OpenXR direct overlay";
51
63
  summary = "The active OpenXR runtime supports a direct overlay session.";
@@ -134,7 +146,17 @@ export function analyzeVRCompatibility(runtime, context = {}) {
134
146
  const canRenderOverlay = readiness === "ready" || readiness === "waiting-for-host" ||
135
147
  (readiness === "fallback-only" && runtime.platform === "linux" && runtime.selectedBackend === "mock");
136
148
  let launch;
137
- if (readiness === "ready" && (runtime.selectedBackend === "openxr" || runtime.selectedBackend === "openvr")) {
149
+ if (unsupportedLibOVRHost) {
150
+ launch = {
151
+ verdict: "incompatible",
152
+ wouldWorkNow: false,
153
+ canStartNow: false,
154
+ fundamentalIncompatibility: true,
155
+ message: "The running VR application uses native Oculus/LibOVR and cannot host an electron-vr overlay.",
156
+ requiredActions: ["use-supported-openxr-host"]
157
+ };
158
+ }
159
+ else if (readiness === "ready" && (runtime.selectedBackend === "openxr" || runtime.selectedBackend === "openvr")) {
138
160
  launch = {
139
161
  verdict: "works-now",
140
162
  wouldWorkNow: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@covas-labs/electron-vr",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Electron VR overlay bridge with OpenXR, OpenVR, and mock fallback backends.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,8 +22,8 @@
22
22
  "electron": ">=37"
23
23
  },
24
24
  "optionalDependencies": {
25
- "@covas-labs/electron-vr-prebuilt-linux-x64": "0.8.1",
26
- "@covas-labs/electron-vr-prebuilt-win32-x64": "0.8.1"
25
+ "@covas-labs/electron-vr-prebuilt-linux-x64": "0.8.2",
26
+ "@covas-labs/electron-vr-prebuilt-win32-x64": "0.8.2"
27
27
  },
28
28
  "publishConfig": {
29
29
  "registry": "https://registry.npmjs.org",