forked from LeenkxTeam/LNXSDK
Update
This commit is contained in:
@ -31,7 +31,7 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
public var _leftViewport: Dynamic;
|
||||
public var _rightViewport: Dynamic;
|
||||
public var _cachedViewsLength: Int = 0;
|
||||
|
||||
|
||||
var savedCanvasWidth: Int = 0;
|
||||
var savedCanvasHeight: Int = 0;
|
||||
var browserRAFId: Int = -1;
|
||||
@ -53,6 +53,7 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
if (webXREnabled) {
|
||||
isWebXR = true;
|
||||
vrEnabled = true;
|
||||
trace("WebXR API detected");
|
||||
}
|
||||
else {
|
||||
var displayEnabled: Bool = Syntax.code("navigator.getVRDisplays");
|
||||
@ -66,11 +67,11 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
#else
|
||||
var displayEnabled = false;
|
||||
#end
|
||||
if (displayEnabled) {
|
||||
vrEnabled = true;
|
||||
getVRDisplays();
|
||||
trace("Display enabled.");
|
||||
}
|
||||
//if (displayEnabled) {
|
||||
// vrEnabled = true;
|
||||
// getVRDisplays();
|
||||
// trace("Display enabled.");
|
||||
//}
|
||||
}
|
||||
|
||||
function getVRDisplays() {
|
||||
@ -245,7 +246,7 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
if (self.onSqueezeEnd) self.onSqueezeEnd(event);
|
||||
};
|
||||
session.addEventListener('squeezeend', handlers.squeezeend);
|
||||
|
||||
|
||||
session.addEventListener('inputsourceschange', handlers.inputsourceschange);
|
||||
|
||||
handlers.visibilitychange = (event) => {
|
||||
@ -748,7 +749,7 @@ class VrInterface extends kha.vr.VrInterface {
|
||||
public function vrRenderCallback(): Void {
|
||||
var g4 = kha.SystemImpl.frame != null ? kha.SystemImpl.frame.g4 : null;
|
||||
|
||||
|
||||
|
||||
if (g4 != null && iron.Scene.active != null && iron.RenderPath.active != null) {
|
||||
|
||||
if (untyped window._vrUpdateStarted == null) {
|
||||
|
||||
Reference in New Issue
Block a user