fixed exit pointer lock

This commit is contained in:
Devaev Maxim
2020-11-07 05:56:00 +03:00
parent b83ba7692a
commit 8f4b943a8d

View File

@@ -72,7 +72,7 @@ export function Mouse(record_callback) {
__ws = ws;
$("stream-box").classList.toggle("stream-box-mouse-enabled", ws);
if (!__absolute && __isRelativeCaptured()) {
$("stream-box").exitPointerLock();
document.exitPointerLock();
}
__updateOnlineLeds();
};
@@ -83,7 +83,7 @@ export function Mouse(record_callback) {
state.absolute = true;
}
if (!__absolute && state.absolute && __isRelativeCaptured()) {
$("stream-box").exitPointerLock();
document.exitPointerLock();
}
if (__absolute && !state.absolute) {
__relative_deltas = [];